016条件查询之等量关系
条件查询语法格式
select
...
from
...
where
过滤条件;
等于
select empno, ename from emp where sal=3000;
select job, sal from emp where ename='FORD';
select grade, losal, hisal from salgrade where grade = 1;
不等于 <> 或 !=
select
empno,ename,sal
from
emp
where
sal <> 3000;
select empno, ename, sal from emp where sal <> 3000;
案例1:查询工资不是3000的员工编号、姓名、薪资
查询不在部门编号为10的部门工作的员工信息
select * from emp where deptno <> 10;