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 table1 (client int); create table table2 (client int); insert into table1 (client) values (1), (2), (3); insert into table2 (client) values (2), (3), (4), (null); select client from table1 where client in (select client from table2); select t1.client, t2.client as match from table1 t1 left join table2 t2 on t1.client = t2.client where t2.client is not null; select t1.client, t2.client as match from table1 t1 inner join table2 t2 on t1.client = t2.client;

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

Copy Clear