Category: Database, Data

If you've been reading these Database Fundamentals posts, you've already seen the WHERE clause because of your use of it when manipulating data with DELETE and UPDATE statements.

The primary places where people run into trouble with T-SQL is in the JOIN criteria and the WHERE clause criteria.

This is used when you have a small list of values and if data matches any of them, you want to return it.

With all these operators you can mix and match them using logical constructs consisting of AND, OR and the use of parenthesis. For example, to select a specific company that is in the Aerospace industry and starts with the letter S, you could use a query like this: This will limit the result to only those values that meet both criteria.

Related Articles