标签:div manager 纽约 字母 and select manage man 使用
select * from emp where sal between 2500 and 5000;--使用between取区间
select * from emp where sal in(2500,5000);--可以指定取想要的数;
select * from emp where sal between 1000 and 4000 and deptno in(10,20);--查询表里工资1000-4000的人,部门要在10和20的人;
select * from emp where deptno in(10,30)and ename not like‘A%‘--查询10 和30部门里没有A开头的
select * from emp where deptno in(10,30)and ename not like‘_%A%‘查询A开头除外所有没有A字母的
select * from emp e, dept d where e.deptno=d.deptno and (d.loc not like‘NEW YORK,CHICAGO‘
or job=‘MANAGER‘and e.ename not like ‘_%B%_%C%‘)--
标签:div manager 纽约 字母 and select manage man 使用
原文地址:http://www.cnblogs.com/wbj195/p/7460222.html