Locked lesson.
About this lesson
We can select data based on multiple conditions using the AND & OR clause
Exercise files
Download this lesson’s related exercise files.
AND & OR Clause.docx58.8 KB AND & OR Clause - Solution.docx
59 KB
Quick reference
AND & OR Clause
We can search for multiple conditions in our Where clause using "And" & "Or".
When to use
Anytime you want to search for more than one thing, use And/Or.
Instructions
To use AND/OR, just add them to your Where clause:
Where [Age] > 21 AND [First Name] LIKE 'John'
or...
Where [Age] > 21 OR [First Name] LIKE 'John'
Hints & tips
- Anytime you want to search for more than one thing, use And/Or.
- AND means everything has to be true
- OR means at least one of the things has to be true
Lesson notes are only available for subscribers.