March 2001
Intermediate to advanced
640 pages
14h 9m
English
SQL Server enables you to search for a range of values with greater than and less than operators, and with the BETWEEN keyword. These comparison operators work just like the equals and not equals comparison methods, so I'll just show you a couple of examples. After that, we'll look at a couple of specific issues with range searching.
SQL Server supports the four basic inequality operators: > (greater than), < (less than), >= (greater than or equals), and <= (less than or equals). All these operators work with a variety of data types (numeric, string, date, and binary). Let's start by looking at numeric comparisons.
This first query looks for products whose price is less than $7: ...
Read now
Unlock full access