16
Select * from emp where empno in(2323,4555,2222);
9字符串的链接操作用:
Select
* from emp where not (sal>1500
17.l模糊查询
Select * from emp where ename LIKE '_M%';
又如姓名中包含M的员工
Select
* from emp where deptno='10' order by sal desc,hiredate asc;(查询部门10的员工工资的升序排列如果工资相等就按员工的入职时间排序)
20.group by 用于对查询的结果进行分组统计: 显示每个部门的平均工资和最高工资
Select avg(sal),max(sal) from emp group by deptno;