Evaluate these two SQL statements:SELECT last_name, salary , hire_dateFROM EMPLOYEESORDER BY salary DESC;SELECT last_name, salary, hire_dateFROM EMPLOYEESORDER BY 2 DESC;What is true about them? () A. The two statements produce identical results.B. The second statement returns a syntax error.C. There is no need to specify DESC because the results are sorted in descending order by default.D. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.

Evaluate these two SQL statements:SELECT last_name, salary , hire_dateFROM EMPLOYEESORDER BY salary DESC;SELECT last_name, salary, hire_dateFROM EMPLOYEESORDER BY 2 DESC;What is true about them? ()

A. The two statements produce identical results.

B. The second statement returns a syntax error.

C. There is no need to specify DESC because the results are sorted in descending order by default.

D. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.


相关考题:

Evaluate these two SQL statements: SELECT last_name, salary, hire_dateFROM EMPLOYEES ORDRE BY salary DESC; SELECT last_name, salary, hire_dateFROM EMPOLYEES ORDER BY 2 DESC; What is true about them? ()A. The two statements produce identical results.B. The second statement returns a syntax error.C. There is no need to specify DESC because the results are sorted in descending order by default.D. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.

Examine the structure of the EMP_DEPT_VU view:Column Name Type RemarksEMPLOYEE_ID NUMBER From the EMPLOYEES tableEMP_NAME VARCHAR2(30) From the EMPLOYEES table JOB_ID VARCHAR2(20) From the EMPLOYEES tableSALARY NUMBER From the EMPLOYEES tableDEPARTMENT_ID NUMBER From the DEPARTMENTS table DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table Which SQL statement produces an error?()A. SELECT * FROM emp_dept_vu;B. SELECT department_id, SUM(salary) FROM emp_dept_vu GROUP BY department _ id;C. SELECT department_id, job_id, AVG(salary) FROM emp_dept_vu GROUP BY department _ id, job_id;D. SELECT job_id, SUM(salary) FROM emp_dept_vu WHERE department_id IN (10,20) GROUP BY job_id HAVING SUM (salary) 20000E. None of the statements produce an error; all are valid.

Examine the data in the EMPLOYEES table:Which three subqueries work? () A. SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C. SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D. SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E. SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F. SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

Examine the data in the EMPLOYEES table:LAST_NAME DEPARTMENT_ID SALARYGetz 10 3000Davis 20 1500Bill 20 2200Davis 30 5000...Which three subqueries work? () A. SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C. SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D. SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E. SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F. SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

Click the Exhibit button and examine the data in the EMPLOYEES table.Which three subqueries work? () A.SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department_id);B.SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);C.SELECT distinct department_id FROM employees WHERE salary ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);D.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);E.SELECT last_name FROM employees WHERE salary ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);F.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));

SQL中,SALARYIN(1000,2000)的语义是______。A.SALARY≤2000 AND SALARY≥1000B.SALARY<2000 AND SALARY>1000C.SALARY=1000 AND SALARY=2000D.SALARY=1000 OR SALARY=2000

SQL中,“SALARY IN(1000,2000)”的语义是()。A.SALARY<=2000 AND SALARY>=1000B.SALARY<2000 AND SALARY>1000C.SALARY=1000 AND SALARY=2000D.SALARY=1000 OR SALARY=2000

下列的预编译SQL语句,哪一个是正确的?A.select * from ?B.select ?,?,? from empC.select * from emp where eno=? salary>?D.select * from emp where ename=? and dept=?

先按课程号升序排列,再按成绩降序排列检索出选课表中的所有信息,下面SQL语句正确的是()。A.SELECT * FROM 选课表 GROUP BY 课程号 DESC,成绩 DESC;B.SELECT * FROM 选课表 GROUP BY 课程号,成绩;C.SELECT * FROM 选课表 ORDER BY 课程号,成绩 DESC;D.SELECT * FROM 选课表 ORDER BY 课程号 DESC,成绩;