Database Reference
In-Depth Information
How It Works
You specify three columns of the Address table.
select AddressID, AddressLine1, City
from Person.Address
You specify the range operator BETWEEN with the range of AddressID you want to include the records
for. Hence, it filters 100 records for the address, ranging between 201 and 300, in other words, a total of
100 records.
where AddressID between 201 and 300
Try It: Using the NOT BETWEEN Operator
Open a New Query window in SQL Server Management Studio. Enter the following query, and click
Execute. You should see the results shown in Figure 5-18.
select AddressID, AddressLine1, City
from Person.Address
where AddressID between 201 and 32521
Figure 5-18. Using the Not Between operator
 
Search WWH ::




Custom Search