标签:style http io ar color os sp on div
一些子查询
select empno, ename from emp where mgr in
(select empno from emp where job=‘MANAGER‘);
select * from dept where deptno not in (select distinct deptno from emp);
select * from dept where deptno not in (select deptno from emp);
select empno, ename, sal from emp where mgr=
(select empno from emp where ename=‘SCOTT‘);
select * from emp where sal > 1.4*
(select avg(sal) from emp);
insert into dept(deptno, dname, loc) select 50, ‘TRAINING‘, ‘PEKING‘ from dual;
update emp set sal=sal*1.2 where exists (select 1 from dept where deptno=emp.deptno and loc=‘DALLAS‘);
标签:style http io ar color os sp on div
原文地址:http://www.cnblogs.com/mahun/p/4125951.html