From the course: Querying Microsoft SQL Server 2022
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Comparison operators - SQL Server Tutorial
From the course: Querying Microsoft SQL Server 2022
Comparison operators
- [Instructor] The mathematical comparison operators are extremely important in the design of useful queries. You might not know them by that name though, but I'm sure you'll recognize them once you see them. They're the equals less than and greater than symbols and by combining two symbols with no space between them, you can get less than or equal to, greater than or equal to, and not equal to, which is literally the less than and greater than symbols put together. There are also a few that use the exclamation point that you can use, but they're not standard. They're not equal to, not less than, and not greater than. This format is not common to see though but you might run across them when exploring queries in databases that other people have made. So it's a good idea to be familiar with what they are. I'd recommend sticking with the standard format when writing queries in SQL Server. So let's see these in action in a…
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.
Contents
-
-
-
-
Limit results with TOP4m 39s
-
(Locked)
Remove duplicates with DISTINCT2m 53s
-
(Locked)
Comparison operators3m 43s
-
(Locked)
Understand NULL values4m 42s
-
(Locked)
Match text with LIKE and wildcards4m 36s
-
(Locked)
Challenge: Retrieve matching text strings49s
-
(Locked)
Solution: Retrieve matching text strings4m 52s
-
(Locked)
Solution: Filter results from a query result4m 28s
-
-
-
-
-
-
-
-
-