Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
SELECT firstname, surname
FROM people
WHERE country = 'Mexico'
ORDER BY surname

Example

...

ORDER BY Multiple Columns

The following SQL statement selects the firstname and surname of all the people from the country = ‘Mexico', in the people table and then sorts by surname in DESC order and then firstname in ASC (ascending order - the default):

...