Learn how you may return only unique rows from your query, removing all duplicates, using the SELECT DISTINCT statement.
- [Instructor] There will be times when you may want to know…all the different values of a column in your result,…without duplication.…For this purpose SQL provides the SELECT DISTINCT statement,…for example if we use the world database,…and I SELECT Continent from Country.…You notice I get 239 rows and many of them are duplicates,…this isn't telling me how different continents there are.…
So for this we have SELECT DISTINCT,…if I say SELECT DISTINCT Continent from Country,…now we only get seven rows,…that's because there's really just a few continents…according to the divisions…using this database there are seven,…and so using the SELECT DISTINCT statement,…you get only unique results.…For another example, let's go to the Exercise File here,…and we'll just copy all of this, and paste it in,…and for this we're gonna use the test database,…and what we have here is a simple table, called test…with two columns, a and b, and they're both integers,…and I add a bunch of rows to this and run select,…and you see we have now this table with 10 rows,…
- Understanding SQL terminology and syntax
- Creating new tables
- Inserting and updating data
- Writing basic SQL queries
- 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
- Defining functions in PHP
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times1m 52s
11. Views and Subselects
12. Defined Functions
13. 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.