SELECT * FROM A JOIN (SELECT * FROM B GROUP BY C1) B ON A.C1 = B.C1
SQL查詢語法如下:
先將多的那方資料表GROUP BY
SELECT * FROM A JOIN (SELECT * FROM B GROUP BY C1) B ON A.C1 = B.C1
資料參考來源:https://www.blueshop.com.tw/board/FUM20041006152735ZFS/BRD201504131127489V0.html