1 | select empno,ename,ename,job,sal from emp; |
1 | select distinct job from emp; |
1 | select empno,ename,(sal*15+(200+100)) income from emp; |
1 | select empno||ename from emp; |
1 2 3 4 5 | select * from emp where sal>1500; select * from emp where ename ='SMITH' select empno,ename,job from emp where job<>'SALESMAN'; |
1 2 3 | select * from emp where sal>1500 and sal<3000; select * from emp where sal>2000 or job='CLERK'; select * from emp where not sal >=2000; |
1 2 | select * from emp where sal between 1500 and 2000; select * from emp where hiredate between '01-1月-1981'and'31-12月-1981'; |
1 | select * from emp where comm is not null; |
1 | select * from emp where empno in (7369,7566,7788,9999); |
1 | select * from emp where ename like 'A%' |
1 | select * from emp where ename like '_A%'; |
1 | select * from emp where ename like '%A%'; |
1 | select * from emp order by sal desc; |
1 | select empno ,ename,sal*12 income from emp order by income; |
1 | select * from emp where deptno=30; |
1 2 | select ename,empno,deptno from emp where job='CLERK'; |
1 | select * from emp where comm>sal*0.6 ; |
1 2 3 | select * from emp where (deptno=10 and job='MANAGER' )or(deptno=20 and job='CLERK' ); |
1 2 3 4 | select * from emp where (deptno=10 and job='MANAGER')or(deptno=20 and job='CLERK')or(job! ='MANAGER'and job!='CLERK' and sal>=2000); |
1 2 3 4 | select * from emp where (deptno=10 and job='MANAGER')or(deptno=20 and job='CLERK')or(job not in ('CLERK','MANAGER') and sal>=2000); |
1 2 3 | select distinct job from emp where comm is not null; |
1 2 3 | select distinct job from emp where comm is null or comm<100; |
1 2 3 | select * from emp where ename not like '%R%'; |
1 2 | select * from emp where ename like '%A%' order by sal desc,hiredate asc,job; |
欢迎光临 度量快速开发平台-专业、快速的软件定制快开平台 (http://plat.delit.cn/) | Powered by Discuz! X3.2 |