SELECT * FROM tableA INNER JOIN tableB USING(id) where tableB.id is null 找出不 B裡的
SELECT * FROM tableA INNER JOIN tableB USING(id) where tableB.id is not null 就自己推一下
打錯一時看錯
應該是
SELECT * FROM tableA as TB LEFT JOIN tableB as TB1 on ( TB.id=TB1.id)
where TB1.id is null 找出不在B裡的
SELECT * FROM tableA as TB LEFT JOIN tableB as TB1 on ( TB.id=TB1.id)
where TB1.id is null 就自己推一下