Evaluate the SQL statement:1 SELECT a.emp_name, a.sal, a.dept_id, b.maxsal2 FROM employees a,3 (SELECT dept_id, MAX(sal) maxsal4. FROM employees5 GROUP BY dept_id) b6 WHERE a.dept_id = b.dept_id7 AND a. asl b. maxsal;What is the result of the statement? ()A. The statement produces an error at line 1.B. The statement produces an error at line 3.C. The statement produces an error at line 6.D. The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company.E. The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.

Evaluate the SQL statement:1 SELECT a.emp_name, a.sal, a.dept_id, b.maxsal2 FROM employees a,3 (SELECT dept_id, MAX(sal) maxsal4. FROM employees5 GROUP BY dept_id) b6 WHERE a.dept_id = b.dept_id7 AND a. asl < b. maxsal;What is the result of the statement? ()

A. The statement produces an error at line 1.

B. The statement produces an error at line 3.

C. The statement produces an error at line 6.

D. The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company.

E. The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.


相关考题:

标准SQL基本查询模块的结构是A)SELECT…FROM…ORDER BYB)SELECT…WHERE…GROUP BYC)SELECT…WHERE…HAVINGD)SELECT…FROM…WHERE

标准SQL基本查询模块的结构是A.SELECT...FROM...ORDER BYB.SELECT...WHERE...GROUP BYC.SELECT...WHERE...HAVINGD.SELECT...FROM...WHERE

标准的SQL基本查询语句的格式是( )。A.SELECT...FROM...WHEREB.SELECT...WHERE...FROMC.SELECT...WHERE...GROUP BYD.SELECT...FROM...ORDER BY

在SQL查询中,若要取得“学生”数据表中的所有记录和字段,其SQL语法为( )。A.SELECT姓名FROM学生B.SELECT*FROM学生C.SELECT姓名FROM学生WHERE学号=02650D.SELECT*FROM学生WHERE学号=02650

标准SQL基本查询模块的结构是A.SELECT. . . FROM. . . ORDER BYB.SELECT. . . WHERE. . . GROUP BYC.SELECT. . . WHERE. . . HAVINGD.SELECT. . . FROM. . . WHERE.

在SQL查询中,若要取得“学生”数据表中的所有记录和字段,其SQL语法为( )。A.SELECT*FROM学生B.SELECT姓名FROM学生C.SELECT姓名FROM学生WHILE学号=02650D.SELECT*FROM学生WHILE学号=02650

在SQL查询中,若要取得“学生”数据表中的所有记录和字段,其SQL语法为( )。A.SELECT姓名FROM学生B.SELECT*FROM学生C.SELECT姓名FROM学生WHERE学号=02650D.SELECT*FROM学生WHERE学号=02650

标准SQL基本查询模块的结构是______。A.SELECT…FROM…ORDER BYB.SELECT…1WHERE…GROUP BYC.SELECT…WHERE…HAVINGD.SELECT…FROM…WHERE

查询“学生”表的所有记录并存储于表文件table1中的SQL语句是( )。A)SELECT﹡FROM学生INTOCURSORtable1B)SELECT﹡FROM学生TOCURSORtable1C)SELECT﹡F1的M学生INTODBFtable1D)SELECT﹡FROM学生TOTABLEtable1

在SQL查询中,若要取得“学生”数据表中的所有记录和字段,其SQL语法为( )。A)SELECT姓名FROM学生B)SELECT*FROM学生C)SELECT姓名FROM学生WHERE学号=02650D)SELECT*FROM学生WHERE学号=02650