--sal為員工工資
select * from emp;
--查詢工資在[1500,3000]范圍的員工信息
select * from emp where sal >= 1500 and sal <= 3000;
select * from emp where sal between 1500 and 3000;
--上面兩句效果一樣
--查詢工資小於1500或者大於3000的員工信息
select * from emp where sal < 1500 or 3000 < sal;
select * from emp where sal not between 1500 and 3000;
--上面兩句效果一樣
--查詢工資為3000員工信息
select * from emp where sal = 3000;