数据库表关联查询
有A和B两个表,两个表同过name关联,现在想找出A中有而B中没有的name,怎么用sql语句查询
------解决方案--------------------select name from a where not exists(select 1 from b where a.name=b.name);
------解决方案--------------------select name from a,b where a.name = b.name(+) and b.name is null