oracle习题及答案学习资料.doc

oracle习题及答案学习资料.doc

ID:57853940

大小:45.50 KB

页数:11页

时间:2020-09-02

oracle习题及答案学习资料.doc_第1页
oracle习题及答案学习资料.doc_第2页
oracle习题及答案学习资料.doc_第3页
oracle习题及答案学习资料.doc_第4页
oracle习题及答案学习资料.doc_第5页
资源描述:

《oracle习题及答案学习资料.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、1.查询工资大于12000的员工姓名和工资Selectlast_name

2、

3、''

4、

5、first_name,salaryfromemployeeswheresalary>12000;2.查询员工号为176的员工的姓名和部门号Selectlast_name

6、

7、''

8、

9、first_name,department_idfromemployeeswhereemployee_id=176;3.选择工资不在5000到12000的员工的姓名和工资Selectlast_name

10、

11、''

12、

13、first_name,salaryfromemp

14、loyeeswheresalarynotbetween5000and12000;4.选择雇用时间在1998-02-01到1998-05-01之间的员工姓名,job_id和雇用时间Selectlast_name

15、

16、''

17、

18、first_name,job_id,hire_datefromemployeeswherehire_datebetween'1-2月-98'and'1-5月-98';5.选择在20或50号部门工作的员工姓名和部门号Selectlast_name

19、

20、''

21、

22、first_name,department_id

23、fromemployeeswheredepartment_idin(20,50);6.选择在1994年雇用的员工的姓名和雇用时间Selectlast_name

24、

25、''

26、

27、first_name,hire_datefromemployeeswherehire_datelike'%94';7.选择公司中没有管理者的员工姓名及job_idSelectlast_name

28、

29、''

30、

31、first_name,job_idfromemployeeswhereManger_idisnull;1.选择公司中有奖金的员工姓名,工资和奖金Sel

32、ectlast_name

33、

34、''

35、

36、first_name,salary,commission_pctfromemployeeswherecommission_pctisnotnull;2.选择员工姓名的第三个字母是a的员工姓名Selectlast_name

37、

38、''

39、

40、first_namefromemployeeswherelast_name

41、

42、''

43、

44、first_namelike'___a%';3.选择姓名中有字母a和e的员工姓名Selectlast_name

45、

46、''

47、

48、first_namefromemployeesw

49、herelast_name

50、

51、first_namelike'%a%e%'orlast_name

52、

53、first_namelike'%e%a%';多表查询4.显示所有员工的姓名,部门号和部门名称。Selecte.last_name,d.department_id,d.department_namefromemployeese,departmentsdwhere(e.department_id=d.department_id);5.查询90号部门员工的job_id和90号部门的location_idSelecte.job_i

54、d,d.location_idfromemployeese,departmentsdwheree.department_id=d.deparement_idandd.department_id=90;6.选择所有有奖金的员工的last_name,department_name,location_id,citySelecte.last_name,d.department_name,l.location_id,cityfromemployeese,departmentsd,locationslwheree.departme

55、nt_id=d.department_idANDd.location_id=l.location_idANDcommission_pctisnotnull;1.选择在Toronto工作的员工的last_name,job_id,department_id,department_nameSelecte.last_name,e.job_id,d.department_id,d.department_namefromemployeese,departmentsd,locationslwheree.department_id=d

56、.department_idANDd.location_id=l.location_idANDl.city='Toronto';2.选择所有员工的姓名,员工号,以及他的管理者的姓名和员工号,结果类似于下面的格式employeesEmp#managerMgr#kochhar101king100Selecte.employee_id"

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。