The ORDER BY clause provides tools for returning results in order. You may order your query results by the values of one or more columns.
- [Instructor] If you've been following the lessons … in sequence, you've seen me use the order by clause … to sort the results of queries. … Here's how it works. … I'm going to use the world database, … and I've pasted in some SQL … from the chapter three exercise files. … So the first line is select name from country. … And here you see all the names in the country table. … There's 239 of them. … And you notice that they're not necessarily … in alphabetical order, you've got a U mixed in with the A's. … They were added in mostly alphabetical order, … but you can see that there are some things out of place. … This is not really sorted. … So if we want it sorted, we can use this … select name from country order by name. … And this will sort it by the name column, … which is the column that we're displaying. … So now you see that they're in alphabetical order. … This is actually askie order. … SQL Lite supports the askie collation. … You can add other collations, … but this is basically askie order. …
This course was created by Bill Weinman. We are pleased to offer this training in our library.
- How databases are organized
- Selecting rows and columns
- Creating new tables
- Inserting and updating data
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Using CRUD functions
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times2m 6s
11. Views and Subselects
12. A Simple CRUD Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.