2019-02-23から1日間の記事一覧
select * from table1 t1 where not exists ( select 1 from table2 t2 where t1.id = t2.id -- <- ここ ); 例の如く、適当な SQL だが、サブクエリで外部の値を使用している。これを left join で書き替える。 select * from table1 t1 left join table2 t2…
select * from table1 t1 where not exists ( select 1 from table2 t2 where t1.id = t2.id -- <- ここ ); 例の如く、適当な SQL だが、サブクエリで外部の値を使用している。これを left join で書き替える。 select * from table1 t1 left join table2 t2…