欢迎投稿

今日深度:

sql中的union,except及intersect,unionintersect

sql中的union,except及intersect,unionintersect


1.union:

使用union:组合两个结果表,消除重复的记录。

使用union all:组合两个结果表(重复不去重)。


2.except:

使用except:在table1中但不在table2中的行,同时消除重复行。

使用except all:不消除重复行。


3.intersect:

获取两个结果集的并集。

版权声明:本文为博主原创文章,未经博主允许不得转载。

www.htsjk.Com true http://www.htsjk.com/shujukunews/9619.html NewsArticle sql中的union,except及intersect,unionintersect 1.union: 使用union:组合两个结果表,消除重复的记录。 使用union all:组合两个结果表(重复不去重)。 2.except: 使用except:在table1中但不在table2中的...
评论暂时关闭