Union与Union All的区别
表1
A
B
C
表2
A
C
D
SQL codeselet * from 表1 union selet * from 表2
结果
A
B
C
D
SQL codeselet * from 表1 union all selet * from 表2
结果
A
B
C
A
C
D
A
B
C
表2
A
C
D
SQL codeselet * from 表1 union selet * from 表2
结果
A
B
C
D
SQL codeselet * from 表1 union all selet * from 表2
结果
A
B
C
A
C
D