Sams Teach Yourself Transact-SQL in 21 Days, Second Edition
by Lowell Mauer, David Solomon, Bennett McEwan
Summary of Search Conditions
Before we start sorting data, let's review what you've learned so far about search conditions:
To improve overall system performance, do all your data filtering on the server. That will reduce network traffic (from transferring unnecessary rows) and simplify application programming.
Search conditions appear in a WHERE clause. The WHERE clause must follow the table list. If no WHERE condition is specified, your query operates on the entire table.
You can use equality, inequality, and range comparisons to test values of any data type. Range searches with datetime values should avoid using BETWEEN.
You will need to combine search conditions with OR and AND. When you combine more than two conditions, especially when OR is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access