The WHERE clause allows you to filter rows from your result rather than returning all the rows in a table. WHERE is often used with the LIKE and IN clauses.
- [Instructor] When you query a database, … more often than not you're looking for specific data, … data that fits a specific criteria. … The WHERE clause allows you to get … just the rows you're looking for … instead of the entire table. … Here we're going to be working with the world database. … And we're just going to start by selecting everything … from the Country table. … So when I execute this query, … you notice that we get get just a lot of data. … It's 239 rows, it's a lot of columns. … This is a very rich table. … It has a lot of information about each country. … For example, if I want to know … just which countries have a population of under 100,000, … it's easy to construct a query like this. … I'm going to put my WHERE clause on the next line. … And I'm going to select just a couple of columns here. … We'll say Name, Continent, … and Population. … I'm going to put my WHERE clause over here … WHERE Population … is less than 100,000. … And I'm going to order it by Population descending, …
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.