首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

oracle子查询(6)

2012-07-05 
oracle子查询(六)select sal from emp where enameJONESselect * from emp where sal2975select * f

oracle子查询(六)

select sal from emp where ename='JONES';

select * from emp where sal>2975;

select * from emp where sal>(select sal from emp where ename='JONES');

select * from emp where job=( select job from emp where empno=7876) and sal>( select sal from emp where empno=7521);

select * from emp where sal>(select avg(nvl(sal,0)) from emp);

select deptno,min(sal) from emp group by deptno having min(sal)>( select min(sal) from emp where deptno=20);

select * from emp where sal < any (select sal from emp where job='CLERK') and job<>'CLERK';

select * from emp where sal > all (select sal from emp where job='CLERK') and job<>'CLERK';

select * from emp where job in(select job from emp where deptno=10) and deptno<>10;

select * from emp where exists(select * from dept);

?

select * from emp where exists(select * from dept where deptno=80);

----- ---------- --------- ----- ----------- --------- --------- ------

热点排行