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