πŸ“Š Database Management System (DBMS)
Q. View the Exhibit and examine the data in the EMPLOYEES tables. Evaluate the following SQL statement: SELECT employee_id, department_id FROM employees WHERE department_id= 50 ORDER BY department_id UNION SELECT employee_id, department_id FROM employees WHERE department_id= 90 UNION SELECT employee_id, department_id FROM employees WHERE department_id= 10; What would be the outcome of the above SQL statement?
  • (A) The statement would execute successfully and display all the rows in the ascending order ofDEPARTMENT_ID.
  • (B) The statement would execute successfully but it will ignore the ORDER BY clause and display the rows in random order.
  • (C) The statement would not execute because the positional notation instead of the column name should be used with the ORDER BY clause.
  • (D) The statement would not execute because the ORDER BY clause should appear only at the end of the SQL statement, that is, in the last SELECT statement.
πŸ’¬ Discuss
βœ… Correct Answer: (D) The statement would not execute because the ORDER BY clause should appear only at the end of the SQL statement, that is, in the last SELECT statement.

You must be Logged in to update hint/solution

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
578
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate