看板 Database 關於我們 聯絡資訊
select a.* from TableA a left join TableB b on a.id=b.id where b.id is null ※ 引述《I234567890 (數字人)》之銘言: : 我有兩個表 分別 A1 和 B1 : 我要搜尋A1的資料並且沒有在B1出現 : A1.id = B1.id : 目前我的 sql 如下 : select * from A1 where id not in (select id from B1) : 但利用子查詢...效能有點低落 : 請問還有甚麼更好的解法 : 謝謝大家 ~~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 1.167.104.34
I234567890:3Q~~ 08/11 22:16