作者gargamel (Nerding)
看板Database
标题Re: [SQL ] 请问SQL COMMAND..
时间Tue Mar 18 18:29:41 2008
: 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)