特殊比较运算符

select * from employees where department_id is null;
select * from employees where department_id is not null;

 

select * from employees between 5000 and 10000;
select * from employees not between 5000 and 10000;

 

select * from employees where department_id in (10,20,50);
select * from employees where department_id not in (10,20,50);

 

select * from employees where department_id not in (10,20,50,null);--逻辑上,只有一个为假,则全部为假,所以没有出现结果

posted @ 2016-08-24 22:54  叨客人  阅读(231)  评论(0编辑  收藏  举报