Which SQL keyword is used to sort the result-set?

  1. ORDER

  2. SORT

  3. SORT BY

  4. ORDER BY


Correct Option: D

AI Explanation

To answer this question, you need to understand how to sort the result-set in SQL.

Option A) ORDER - This option is incorrect because the keyword "ORDER" alone is not used to sort the result-set in SQL.

Option B) SORT - This option is incorrect because the keyword "SORT" alone is not used to sort the result-set in SQL.

Option C) SORT BY - This option is incorrect because the keyword "SORT BY" is not used to sort the result-set in SQL. The correct keyword to use is "ORDER BY".

Option D) ORDER BY - This option is correct because the keyword "ORDER BY" is used in SQL to sort the result-set in ascending or descending order based on one or more columns.

The correct answer is D. This option is correct because "ORDER BY" is the SQL keyword used to sort the result-set.

Find more quizzes: