关于mysql:MySQL-union合并查询

7次阅读

共计 199 个字符,预计需要花费 1 分钟才能阅读完成。

​ 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;

正文完
 0