日期:2014-05-17 浏览次数:20401 次
SELECT * FROM a NOT EXISTS (SELECT * FROM b)
------解决方案--------------------
select 名字,年龄 from a INTERSECT select 名字,年龄 from b
------解决方案--------------------
select 名字,年龄,'From a' --方便查看是那个表里的 from a INTERSECT select 名字,年龄,'From b' from b
------解决方案--------------------
SELECT * FROM [Test].[XCYX_NationalTax] AS A Where NOT EXISTS (SELECT * FROM [Test].[XCYX_LandTax] AS B Where A.名字=B.名字 And A.年龄=B.年龄)