求A表中,B表中没有的数据行 select * from a where not exists (select 1 from b where a.b外键=b.b主键) --2 B表中,A表没有的数据行 select * from b where not exists (select 1 from a where b.a外键=a.a主键)
那里的惠普啊?
------解决方案--------------------
SQL code
--第二题
select a.* from Employees as a,Sales as b where a.[EmployeeID]=b.[EmployeeID] and not exists(select 1 from tb where [EmployeeID]=b.[EmployeeID] and salesamount <50)