SQL in查询

--sal为员工工资

select * from emp;

SQL in查询

--查询工资等于1500或3000或5000的用户信息

select * from emp where sal in (1500, 3000, 5000);
select * from emp where sal = 1500 or sal = 3000 or sal = 5000;

SQL in查询

--查询工资不是1500 && 3000 && 5000 的用户信息

select * from emp where sal not in (1500, 3000, 5000);
select * from emp where sal != 1500 and sal != 3000 and sal != 5000;
select * from emp where sal <> 1500 and sal <> 3000 and sal <> 5000;

--数据库不等于有两种表示:!= <>

上一篇:html,css命名规范 (转)


下一篇:web前端开发CSS命名规范参考