结果集比较EXCEPT与INTERSEC


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

EXCEP:返回左结果集不在右结果集中的记录
INTERSEC:返回两个结果集相同的记录

SELECT * FROM (
SELECT 1 id,1 name1 UNION ALL SELECT 2,2 UNION ALL SELECT 3,3)m
EXCEPT
SELECT * FROM (
SELECT 1 id,1 name1 UNION ALL SELECT 2,2 UNION ALL SELECT 4,4 )n