sql数据查询的集合查询:
select * from student
where Sdept='CS'
union
select * from student
where Sage <= 19;
可以实现,
把关键字union改成
intersect或except都无法实现
union 并操作 ,intersect 交操作,except 差操作请指教。
select * from student
where Sdept='CS'
union
select * from student
where Sage <= 19;
可以实现,
把关键字union改成
intersect或except都无法实现
union 并操作 ,intersect 交操作,except 差操作请指教。
intersect:inner join
except:left join where id is null
要求表有相同的KEY字段
Intersect
except
这两种操作符。不过你可以通过其它语句来实现比如 INNER JOIN, EXISTS, NOT EXISTS等