Access to all courses
Where - SQL
Filtering Data We don't always want every single record from our table. Very often we want to grab data about a specific item in our table. For instance, if we have a user's email or ID, and we want to grab the date they joined our application by looking up their 'createdAt' date we would need to 'filter' our select query down. We can do this by attached a "WHERE" statement to the end of our "SELECT" statement. If we wanted to grab just the user who's ID is "2", we would add WHERE id=2; to the end of our statement like so:
The rest of this lesson is waiting.
Join JS Mastery Pro to unlock it.





Get Full Access
$149 /month
Lock in a year & save—2 months free!
Quizzes, mini-challenges, AI summaries, inline sandboxes
Participation in a private community
Build real production-grade apps
Mock interviews & project reviews
Weekly live sessions & member-only access