日期:2014-05-18  浏览次数:20605 次

求一SQL语句,请大家帮帮忙啊!100分送上!
需求如下:
有A和B系列表,A1,A2,A3......B1,B2,B3.....
想得到这样的语句,同时在A表中出现,在B表中不存在!
因为表的数量是动态的,由用户决定,现在假设是3张表,
在A1,A2,A3中的某列名下都存在而在B1,B2,B3中同名列中没有出现的数据!

数据库是SQL2000,因此无法使用intersect函数,
请朋友们帮帮忙啊~

------解决方案--------------------
SQL code
select * from A where binary_checksum(*) not in (select binary_checksum(*) from B)

------解决方案--------------------
select * from A
where not exists(select 1 from binary_checksum(*) from B where CHECKSUM(*) = CHECKSUM(a.*))
------解决方案--------------------
SQL code
select * from A 
where not exists(select 1 from binary_checksum(*) from B where CHECKSUM(*) = CHECKSUM(a.*))

------解决方案--------------------
探讨
明明看见回复数5,怎么看不见回帖!!!!