Multiple choice technology databases

how can you return all the records from a table named "Persons" sorted descending by "FirstName"

  1. SELECT * FROM Persons ORDER BY FirstName DESC

  2. SELECT * FROM Persons SORT BY 'FirstName' DESC

  3. SELECT * FROM Persons SORT 'FirstName' DESC

  4. SELECT * FROM Persons ORDER FirstName DESC

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To sort results in SQL, use the ORDER BY clause followed by ASC (ascending) or DESC (descending). For descending order by FirstName, the correct syntax is 'ORDER BY FirstName DESC'. Option A correctly uses: 'SELECT * FROM Persons ORDER BY FirstName DESC'. Options B and C incorrectly use 'SORT' instead of 'ORDER BY'. Option D is missing the 'BY' keyword after ORDER.