3 回答

慕用0363343
TA貢獻9條經(jīng)驗 獲得超8個贊
1、UNION用的比較多
語法如下:
select employee_id,job_id from employees
union
select employee_id,job_id from job_history
2、union all是直接連接,取到得是所有值,記錄可能有重復(fù)。
語法如下:
select * from emp where deptno >= 20
union all
select * from emp where deptno <= 30
注意:union 是取唯一值,記錄沒有重復(fù)
添加回答
舉報
0/150
提交
取消