摘要: SQL> --1.查询员工的所用数据SQL> select * from emp;SQL> --2.查询职位(JOB)为“PRESIDENT”的员工的工资SQL> select sal from emp where job ='PRESIDENT'; SQL> --3.查询佣金(COMM)为0或为NULL的员工信息SQL> select * from emp where comm=0 or comm is null; SQL> --4.查询入职时间在1981-5-1到19... 阅读全文
posted @ 2012-03-14 20:52 Springside4 阅读(160) 评论(0) 推荐(0)
摘要: SQL> --09.查询所有工资高于平均工资(平均工资包括所有员工)的销售人员(‘SLESMAN’)SQL> select * from emp where job='SLESMAN' and sal > (select avg(sal) from emp); SQL> --10.显示所有职员的姓名及其所在的名称和工资SQL> select ename, dname,sal from emp e,dept d where e.deptno=d.deptno;SQL> --11.查询在研究部(‘RESARCH’)工作员工的编号,姓名,... 阅读全文
posted @ 2012-03-14 20:42 Springside4 阅读(157) 评论(0) 推荐(0)