scott用户默认表介绍
表连接操作
并集:
select * from t_user1
union all
select * from t_user2;
交集:
select * from t_user1
intersect
select * from t_user2;
差集:
select * from t_user1
minus
select * from t_user2;
内连接:
select * from emp t join dept d on t.deptno=d.deptno;
外连接:
--左外连接:
select * from emp e left join dept d on e.deptno=d.deptno;
--右外连接:
select * from emp e right join dept d on e.deptno=d.deptno;