Skip to main contentSkip to solution

Which query displays 'CustName' and 'Email' from the 'CUSTOMER' table, sorted alphabetically by 'CustName'?

Solution

✅ Correct Option: 2

In SQL, the ORDER BY clause sorts the result, and ASC (the default) sorts in ascending, i.e. alphabetical, order. Option 2 selects both columns in the asked order and sorts by CustName.


Option 1: SQL has no SORT BY clause in standard syntax, so the query gives an error.

Options 3 and 4: they sort by Email, not CustName.

ASC is optional because ascending is the default; use DESC for reverse order.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question