Which keyword would you use to sort results in descending order by a column named 'score'?

Study for the IGCSE Algorithms and Pseudocode exam to demonstrate mastery of computing foundations. Enhance learning with quizzes, in-depth explanations, and custom study plans. Begin your journey to success now!

Multiple Choice

Which keyword would you use to sort results in descending order by a column named 'score'?

Explanation:
Sorting results in SQL is controlled by the ORDER BY clause, and the direction of that sort is specified by either ASC (ascending) or DESC (descending). To arrange by a column named score in descending order, you use the column after ORDER BY and add DESC to indicate the direction. For example: SELECT * FROM table ORDER BY score DESC. DESC is the keyword that makes the sort go from highest to lowest. Using ASC would flip it to ascending, and GROUP BY is for grouping rows, not sorting.

Sorting results in SQL is controlled by the ORDER BY clause, and the direction of that sort is specified by either ASC (ascending) or DESC (descending). To arrange by a column named score in descending order, you use the column after ORDER BY and add DESC to indicate the direction. For example: SELECT * FROM table ORDER BY score DESC. DESC is the keyword that makes the sort go from highest to lowest. Using ASC would flip it to ascending, and GROUP BY is for grouping rows, not sorting.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy