Which identifier denotes descending order in a sort operation?

Study for the SQL Basics Test. Improve your knowledge with multiple choice questions and detailed explanations. Prepare effectively to master SQL concepts!

Multiple Choice

Which identifier denotes descending order in a sort operation?

Explanation:
In SQL, sort direction is specified after the column in an ORDER BY clause. The keyword DESC denotes descending order, so you sort from largest to smallest for numbers, newest to oldest for dates, or Z to A for text. This makes DESC the correct identifier for descending order. If no direction is given, many databases default to ascending order, and you can also use ASC to explicitly request ascending. You can apply different directions to multiple columns, for example ORDER BY date_col DESC, name_col ASC.

In SQL, sort direction is specified after the column in an ORDER BY clause. The keyword DESC denotes descending order, so you sort from largest to smallest for numbers, newest to oldest for dates, or Z to A for text. This makes DESC the correct identifier for descending order. If no direction is given, many databases default to ascending order, and you can also use ASC to explicitly request ascending. You can apply different directions to multiple columns, for example ORDER BY date_col DESC, name_col ASC.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy