- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
oracle-web考试题
oracle-web考试题
oracle:
1.查询工资高于7000但是没有提成的所有员工.
select * from employees where salary7000 and commission_pct is null
2.查询所有last_name 由四个以上字母组成的员工信息
select * from employees where last_name like %____%
3.查询50号部门每人增长1000元工资之后的人员姓名及工资.
select first_name,last_name,(salary+1000) salary from employees where department_id=50
4. 查询所员工的email全名,公司email 统一以 @ 结尾.
select (email || @) email from employees
5.查询佣金(COMM)为0或为NULL的员工信息
select * from employees where commission_pct=0 or commission_pct is null
6.显示公司里所有员工的工资级别case when
=5000 A 5000-8000 B 8000-15000 C 15000以上 D
select first_name, case when salary=5000 then A
when salary5000 and salary=8000 then B
when salary8000 and salary=15000 then C
else D end 工资级别
from employees
7.把hiredate列看做是员工的生日,求下月过生日的员工(考察知识点:单行函数)
select first_name from employees where to_char(hire_date,mm)=to_char(add_months(sysdate,1),mm)
8.求1981年下半年入职的员工(考察知识点:单行函数)
select * from employees where hire_date between01-7月-1981 and 01-1月-1982
9.判断今年是不是闰年
select sysdate-217 from dual
10.打印下半月入职的员工信息(单行函数)
select * from employees where to_char(hire_date,mm)06
11.求1981年各个月入职的的员工个数(考察知识点:组函数)
select count(*) 入职人数,to_char(hire_date,mm) 月份 from employees
where to_char(hire_date,yyyy)=1981 group by hire_date
12.查询50号部门,60号部门,70号部门的平均工资
select avg(salary) 平均工资, department_id 部门编号 from employees
where department_id in(50,60,70) group by department_id
13.查询各岗位的员工总数.
select count(*) 员工数,job_id 岗位 from employees group by job_id
14.查询平均工资高于8000元的部门的最高工资
select max(max) 最高工资
from (select max(salary) max, department_id from employees group by department_id having avg(salary)8000)
15.统计公司里经理人数
select count(distinct manager_id) from employees
16.打印所有员工的姓名,工资,入职时间以及所在部门的名称
select first_name ||-|| last_name name,salary,hire_date,department_id from employees
17.打印出公司里最高工资排名在第五到第十位的员工信息
select * from
(se
文档评论(0)