SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table t1 (id int, c1 int, c2 int); insert into t1 select 1, 4, null; insert into t1 select 2, 9, null; create table t2 (id int, c1 int, c2 int); insert into t2 select 1, null, 5; insert into t2 select 3, null, 7; select coalesce(t1.id, t2.id) id, coalesce(t1.c1, t2.c1) c1, coalesce(t1.c2, t2.c2) c2 from t1 full outer join t2 on t1.id = t2.id;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear