第1个回答 2011-11-13
楼上请自重,一楼的方法也不对
比较完美的方法是这样的
R∪S :select r.* from r
union select s.* from r, s
where r.a<>s.a or r.b<>s.b or r.c<>s.c/*<>就是!=*/
R∩S:select r.* from r,s
where r.a=s.a and r.b=s.b and r.c=s.c
R-S: select a,b,c from r
where not exists
(select a,b,c from s
where r.a=s.a and r.b=s.b and r.c=s.c)