摘要:
SQLServer2005通过intersect,union,except和三个关键字对应交、并、差三种集合运算。他们的对应关系可以参考下面图示相关测试实例如下:usetempdbgoif(object_id('t1')isnotnull)droptablet1if(object_id('t2')isnotnull)droptablet2gocreatetablet1(aint)insertintot1select1unionselect2unionselect3createtablet2(aint)insertintot2select3unionselect4 阅读全文