2つのテーブルがあります。ProductAおよびProductB。
ProductA
ID Description
A1 ProdA1
B1 ProdB1
C1 ProdC1
D1 ProdD1
E1 ProdE1
ProductB
ID SubId
A1 112
A1 118
B1 111
B1 113
D1 117
D1 118
E1 115
E1 116
E1 117
ProductAテーブルのすべてのレコードとProductBテーブルのSubId列を出力するクエリを作成して、ProductAのIDがProductBに存在する場合は、SubIdを表示します。それ以外の場合はNULLを表示します。したがって、上記の表では、次の出力が表示されます。
ID Description SubId
A1 ProdA1 112
B1 ProdB1 111
C1 ProdC1 NULL
D1 ProdD1 117
E1 ProdE1 116
どうすればこれを行うことができますか?