MySQL union合并查询

Posted C

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL union合并查询相关的知识,希望对你有一定的参考价值。

​ union和union all

​ 区别:union将合并的结果去重;union all 不去重

​ select ename from emp where empno=7900 union select ename from emp where empno>=7900;

​ select ename from emp where empno=7900 union all select ename from emp where empno>=7900;900;

以上是关于MySQL union合并查询的主要内容,如果未能解决你的问题,请参考以下文章