1.
Oracle精选面试题显示10号部门的所有经理('MANAGER和20号部门的所有职员('CLERK的详细信息 答案:
Select * from emp where deptno =10 and job='ANAGERor deptno=20 and job='clerk';
select * from emp where de ptno = 10 and job = 'MANAGER' or de ptno = 20 and job ='CLERK';
2.
显示姓名中没有’L'字的员工的详细信息或含有'SM'字的员工信息 答案:Select * from emp where en ame note like %L%or en ame like %SM%;
select * from emp where en ame not like '%L%' or en ame like '%SM%';
答案:
select * from emp where comm > sal;
答案:
select * from emp where to_char(hiredate, 'mm') = to_char(sysdate , 'mm');
答案:
多表查询sql语句面试题select * from emp where to_char(hiredate, 'mm') = to_char(add_ mon ths(sysdate,1) , 'mm');
答案:
select * from emp where to_char(hiredate,'yyyy') = '1982';
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论