sql查询练习题含答案[整理].pdfVIP

  • 35
  • 0
  • 约7.07千字
  • 约 6页
  • 2020-08-27 发布于福建
  • 举报
-- (1) 查询 20 号部门的所有员工信息。 select * from emp e where e.deptno=20; -- (2 ) 查询奖金( COMM)高于工资( SAL)的员工信息。 select * from emp where commsal; -- (3) 查询奖金高于工资的 20%的员工信息。 select * from emp where commsal*0.2; -- (4 ) 查询 10 号部门中工种为 MANAGER和 20 号部门中工种为 CLERK的员工的信息。 select * from emp e where (e.deptno=10 and e.job=MANAGER) or (e.deptno=20 and e.job=CLERK) -- (5) 查询所有工种不是 MANAGER和 CLERK, -- 且工资大于或等于 2000 的员工的详细信息。 select * from emp where job not in(MANAGER,CLERK) and sal=2000; -- (6) 查询有奖金的员工的不同工种。 select * from e

文档评论(0)

1亿VIP精品文档

相关文档