ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 047-075

047-075

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-18 10:27:41 0 删除 编辑
75. View the Exhibit and examine the structure of the EMPLOYEES table.
You want to know the FIRST_NAME and SALARY for all employees who have the
same manager as that of the employee with the first name 'Neena' and have
salary equal to or greater than that of 'Neena'.
Which SQL statement would give you the desired result?
A. SELECT first_name, salary
FROM employees WHERE (manager_id, salary) >= ALL (SELECT manager_id, salary
FROM employees WHERE first_name = 'Neena' ) AND first_name <> 'Neena';
B. SELECT first_name, salary
FROM employees WHERE (manager_id, salary) >= (SELECT manager_id, salary
FROM employees WHERE first_name = 'Neena' ) AND first_name <> 'Neena';
C. SELECT first_name, salary
FROM employees WHERE (manager_id, salary) >= ANY (SELECT manager_id, salary
FROM employees WHERE first_name = 'Neena' ) AND first_name <> 'Neena';
D. SELECT first_name, salary
FROM employees WHERE ( manager_id = (SELECT manager_id
FROM employees WHERE first_name = 'Neena' )
AND salary >= ( SELECT salary
FROM employees WHERE first_name = 'Neena' ) )
AND first_name <> 'Neena';
Answer: D
(容易错)

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11312660/viewspace-718854/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 047-074
下一篇: 047-076
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    213917