WHERE Keyword in SQL Server

WHERE Keyword in SQL Server

In this post, The SQL WHERE keyword is used to select data conditionally, by adding it to already existing SQL SELECT query. The WHERE keyword can be used to select, update and delete data from table, but for now we will stick with conditionally retrieving data, as we already know how to use the SELECT keyword.

SELECT * FROM Customer
WHERE Country='India'

The following operators can be used in the WHERE commands

Operator    Description

<>              Not equal. Note: In some versions of SQL this operator may be written as !=
>                 Greater than
<                 Less than
=                  Equal
>=               Greater than or equal
<=               Less than or equal
BETWEEN    Between a certain range
LIKE              Search for a pattern
IN                To specify multiple possible values for a column