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

求一SQL语句,从两个表中取值??
表   A   有字段   a  
表   B   有字段   a  

要找出   A   中   B所没有的值,相同的就不拿出来了

不知道我说明白没,谢谢了!

------解决方案--------------------



select * from A where A not in(select a from B)
------解决方案--------------------
select * from A where not exists(select a from b where a.a = b.a)