Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
CREATE TABLE A (id int); INSERT INTO A VALUES (1),(2),(3),(4),(5); CREATE TABLE B (id serial, A_id int); INSERT INTO B (A_id) VALUES (1),(2),(2),(4),(4); SELECT * FROM A WHERE NOT EXISTS ( SELECT true FROM B WHERE A_id = A.id ); SELECT * FROM B RIGTH JOIN A ON A.id = b.A_id;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear