From the course: Microsoft SQL Server 2016: Query Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

WHERE clause relational operators

WHERE clause relational operators - SQL Server Tutorial

From the course: Microsoft SQL Server 2016: Query Data

Start my 1-month free trial

WHERE clause relational operators

- [Lecturer] In this lesson, we're going to introduce you to some of the WHERE clause relational operators. Some may call them conditional operators, some may call them comparison operators, and it basically just means the same thing. We've seen an example of the =. So this is a query that we executed in the video on an Introduction to the WHERE clause, and if we run this one again, we can see that we're returning only the records that represent a marital status of M or married, and we had 146 rows and we just simply returned the three columns for LoginID, JobTitle, and MaritalStatus. But if we want to compare other values or other variables within our database? Let's take a look at an example where we want to look for employees who are above a certain organizational level. And in this case we've changed our WHERE clause to indicate that we want to test the values in the OrganizationLevel field and only return those that are greater than 2. So let's run this query and see what…

Contents