When using ORDER BY, what must be included in the SELECT list?

Prepare for IT Operations Management exams. Use our extensive question bank and real-world scenarios to master the subject. Get ready for your ITOM exam with confidence!

Multiple Choice

When using ORDER BY, what must be included in the SELECT list?

Explanation:
Sorting rows uses the values from the column you specify, but the output you actually see comes from the columns listed in your SELECT clause. If you want the value you’re sorting by to appear in the results, that column must be included in the SELECT list. In many practical queries, you include the sorting column so you can both sort and display it. The other options imply requirements that aren’t necessary: you don’t have to pull in all fields, and you don’t have to restrict to only aggregated fields.

Sorting rows uses the values from the column you specify, but the output you actually see comes from the columns listed in your SELECT clause. If you want the value you’re sorting by to appear in the results, that column must be included in the SELECT list. In many practical queries, you include the sorting column so you can both sort and display it. The other options imply requirements that aren’t necessary: you don’t have to pull in all fields, and you don’t have to restrict to only aggregated fields.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy