3 回答

慕用0363343
TA贡献9条经验 获得超8个赞
1、UNION用的比较多
语法如下:
select employee_id,job_id from employees
union
select employee_id,job_id from job_history
2、union all是直接连接,取到得是所有值,记录可能有重复。
语法如下:
select * from emp where deptno >= 20
union all
select * from emp where deptno <= 30
注意:union 是取唯一值,记录没有重复
添加回答
举报
0/150
提交
取消