逻辑运算符

--工资超过5000 且last_name 以s 结尾的员工
select * from employees where salary>=5000 and last_name like '%s';

--查询部门是10,20,以及没有部门的员工
select * from employees where department in (10,20) or department_id is null;

 

posted @ 2016-08-24 23:27  叨客人  阅读(110)  评论(0编辑  收藏  举报