SQL如何找出連接兩表之後,兩表共有的記錄
其實這個問題就是平常
查詢出A表中有但B表中沒有的數據
select * from class1 a
left join student_info b
on a.student_id=b.student_id
where b.student_id is null
=>
查詢出A表中有但B表中不是沒有的數據 = 查詢出AB兩表中共有數據
select * from class1 a
left join student_info b
on a.student_id=b.student_id
where b.student_id is not null
上了仨月班感覺直接癡呆 學的沒有忘得快
2020年6月30日18:35:23
到點了,下班回家