: TABLEA
: 客編 客戶名稱
: 100001 金石洞
: 100002 王百貨
: 100003 江老闆
: :
: TABLEB
: 客戶編號 客戶名稱
: 100001 金石洞
: 100003 江老闆
: :
: (客編100002不見了)
: 我要找出有哪幾個紀錄在TABLEA有但TABLEB是沒有的,用客編去找(如:挑出王百貨)
: 請問SQL Command要如何下
select * from tablea a
where not exists
(select * from tableb b
where b.id = a.id)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.250.190.113
※ 編輯: gargamel 來自: 60.250.190.113 (03/18 18:30)