SQL TutorialLesson 5Free preview
SQL Where
This lesson is part of SQL · All levels
Summary
The WHERE clause is used to filter the line so that only those who qualify for a particular qualification are included in the query. The condition can be a comparison of =, <>, >, >=, <, or <=. Without WHERE, the query will process all the rows in the table.
Key points
- WHERE is placed after FROM and before ORDER BY.
- Conditions support the comparison operator: =, <>, >, >=, <, <=.
- The text value is written with a single quotation mark, while the numbers do not need to be quoted.
- Logical operators AND, OR, and NOT can combine several conditions.
- WHERE cannot use the aggregate function; for that use HAVING.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.