步骤 2 : 常用条件限定表达式 步骤 3 : between and 步骤 4 : in 步骤 5 : like 步骤 6 : is null
只查询工资高于5000的员工
select * from hr.employees where salary >5000 select * from hr.employees where salary between 3000 and 5000 查询工资在3000到5000之间的 闭区间,即取得到3000 select * from hr.employees where salary in(3000,6000) 即薪水要么等于3000要么等于6000
like用于进行模糊查询
select * from hr.employees where first_name like '%a_' 名字里倒数第二个字母是a的员工 %表示任意匹配,有或者没有都可以 _表示有,并且只有一个 select * from hr.employees where department_id is null 查询所在部门为null的员工,即该员工暂时还未分配工作部门
HOW2J公众号,关注后实时获知最新的教程和优惠活动,谢谢。
提问已经提交成功,正在审核。 请于 我的提问 处查看提问记录,谢谢
|