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

Study for the IT Operations Management (ITOM) Exam. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

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