java学习条件查询之not
1、查询出薪水不包含1600和薪水不包含3000的员工(第一种写法)
select * from emp where sal <> 1600 and sal <> 3000;

2、查询出薪水不包含1600和薪水不包含3000的员工(第二种写法
select * from emp where not (sal = 1600 or sal = 3000);

3、查询出薪水不包含1600和薪水不包含3000的员工(第三种写法)
select * from emp where sal not in (1600, 3000);

4、查询出津贴不为null的所有员工
select * from emp where comm is not null;

阅读量:110
阅读量:60
阅读量:42
阅读量:171
阅读量:187