Skip
Arish's avatar

92. Alphabetical Sorting


Alphabetical Order

Sort text columns alphabetically.

sql
1SELECT name FROM students
2ORDER BY name;

Returns A-Z order: Alice, Bob, Carol...

With Other Columns

sql
1SELECT name, course FROM students
2ORDER BY course, name;