From the course: From Excel to SQL
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Comparison operators in SQL
From the course: From Excel to SQL
Comparison operators in SQL
- [Instructor[ When working with a where clause, it's useful to know the different kinds of comparison operators you can use to filter your data. So to demonstrate them, what I've done here is create a simple query which is going to select all information about an employee based on some criteria. So, if we want to find out all those employees that have used exactly nine days of vacation, we use the equals comparison operator. And so we'll write, where vacation taken equals nine and then run the query. And we can see we've got two employees that match that criteria. Now if you want to know who's taken greater than nine vacation days, we can change the equals operator to the greater than operator and rerun the query. And now we see all those who've taken more than nine days vacation. We can combine greater than and equals together to the greater than or equals operator. And so this will include everyone who's taken…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.