📚 Practice Mode

databases Online Quiz - 98

Learn at your own pace with hints and detailed explanations

1 / 20
Multiple Choice

Evaluate these two SQL statements: SELECT last_name, salary , hire_date FROM EMPLOYEES ORDER BY salary DESC; SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC;

  1. The two statements produce identical results.
  2. The second statement returns a syntax error.
  3. There is no need to specify DESC because the results are sorted in descending order by default.
  4. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.