The table below shows the complete "Customers" table from the Northwind sample database:
The following SQL statement selects all fields from "Customers" where country is "Germany" AND city is "Berlin":
The following SQL statement selects all fields from "Customers" where city is "Berlin" OR "Stuttgart":
The following SQL statement selects all fields from "Customers" where country is "Germany" OR "Spain":
The following SQL statement selects all fields from "Customers" where country is NOT "Germany":
You can also combine the AND, OR and NOT operators.
The following SQL statement selects all fields from "Customers" where country is "Germany" AND city must be "Berlin" OR "Stuttgart" (use parenthesis to form complex expressions):
The following SQL statement selects all fields from "Customers" where country is NOT "Germany" and NOT "USA":