oracle问题~十万火急~

来源:百度知道 编辑:UC知道 时间:2024/05/05 06:47:22
设有雇员表emp(empno,ename,age,sal,tel,deptno),
其中:empno-----编号,name------姓名,age -------年龄,sal-----工资,tel-----电话
deptno-----部门号。
请按下列要求分别晨SQL*PLUS下编程。(每小题2分,共10分)
1、查询家有电话的职工信息。

2、查询工资在500至800元之间的雇员信息

3、按年龄递增顺序显示雇员编号、姓名、年龄、工资

4、求部门号为D_01的平均工资

5、查找部门号为D_01的40岁以上而工资在400元以下的雇员名单。

1、select * from emp where tel is not NULL;
2、select * from emp where sal between 500 and 800;
3、select empno,ename,age,sal from emp order by age;
4、select avg(sal) from emp where empno='D_01';
5、select ename from emp where empno='D_01' and age>40 and sal < 400;

---
以上,希望对你有所帮助。