テーブルの結合備忘録
SQLのfrom句にテーブルをカンマ区切りで複数並べる場合、クロス結合となる。
クロス結合はcross join句を使用しても記述できる。
以下の2つは同じ。
select * from table1, table2;select * from table1 cross join table2;SQLのfrom句にテーブルをカンマ区切りで複数並べる場合、クロス結合となる。
クロス結合はcross join句を使用しても記述できる。
以下の2つは同じ。
select * from table1, table2;select * from table1 cross join table2;技術に関するTipsやお好きなネタを自由に投稿して、あなたの知見を共有してみよう!
無料でご利用いただけます。