Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
大量のデータを含む 1 つのテーブルがあり、このテーブルからすべてを選択したいと考えています。
別のテーブルには異なるステータスコード ( フィールドIDとtext) が含まれており、このテーブルを最初のテーブルに結合したいので、次のようなものを取得します
ID
text
id1,text2,id2,text2最初のテーブルまたは2 番目のテーブルのすべてのデータid1,id2,text1,text2。
id1,text2,id2,text2
id1,id2,text1,text2
使用するLEFT OUTER JOIN
LEFT OUTER JOIN
Select T1.*,T2.ID,T2.Text from firstTable t1 LEFT OUTER JOIN SecondTable T2 on T1.<col>=T2.<col>