SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table tab1 ( id int, name text ); insert into tab1 values (1, 'Name1'), (2, 'Name2'); create table tab2 ( id int, name text ); insert into tab2 values (1, 'Name1'), (2, null); select t.name, k.name from tab1 t left join tab2 k on t.id = k.id where k.name is not null; select t.name, k.name from tab1 t left join tab2 k on t.id = k.id and k.name is not null;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear