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

  1. ORDER

  2. ORDER BY

  3. SORT BY

  4. SORT


Correct Option: B

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. It needs to be combined with another keyword.

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

Option C) SORT BY - This option is incorrect because "SORT BY" is not a valid keyword in SQL for sorting the result-set.

Option D) SORT - This option is incorrect because "SORT" is not a valid keyword in SQL for sorting the result-set.

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

Find more quizzes: