兩條SQL語句
取出一個表中某字段相同的數(shù)據(jù)
select top 339 * from Sheet where carNO in (select carNO from Sheet group by carNO having count(*)>1) order by carNO DESC
對比兩表中區(qū)分的數(shù)據(jù)并提出
select * from B where checksum(*) not in (select checksum(*) from A)
select * from kehu where checksum(車牌) not in (select checksum(車牌) from member) and checksum(客戶名稱)
表示是A表有,B表沒有的數(shù)據(jù).
posted on 2007-11-20 10:38 sooxin 閱讀(142) 評論(0) 編輯 收藏 所屬分類: SQL