SQL ------ 查询练习2

在这里插入图片描述

use employees;
#–6.查询50号部门每人增长1000元工资之后的人员姓名及工资
select first_name,last_name,salary+1000 from employees where DEPARTMENT_ID=50;
– 7题已做
#–8.查询80号部门工资大于8000并且提成高于0.3的员工姓名,工资以及提成
select first_name,last_name,salary,COMMISSION_PCT from employees where
(salary>8000)and(COMMISSION_PCT>0.3);

#–9.查询职位(job_id)为’AD_PRES’的员工的工资
select salary from employees where job_id=‘AD_PRES’;

#–10.查询佣金(commission_pct)为0或为NULL的员工信息
select * from employees where (commission_pct=0) or (commission_pct is null);

#–11.查询入职日期在1997-5-1到1997-12-31之间的所有员工信息
select *from employees where hire_date between ‘1997-5-1’and’1997-12-31’;

#–12.显示姓名中没有’L’字的员工的详细信息或含有’SM’字的员工信息
select * from employees where (FIRST_NAME!=);

#–13.查询电话号码以5开头的所有员工信息
select * from employees where phone_number like ‘5%’;

#–14.查询80号部门中last_name以n结尾的所有员工信息
select * from employees where DEPARTMENT_ID=80 and last_name like ‘%n’;

#–15.查询所有last_name 由六个以上字母组成的员工信息且包含字母D
select * from employees where length(last_name)>=6 and last_name like ‘%D%’;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值