Monday, December 6, 2010

Where clause in SQL

This "where" clause is used to filter results.

When you want to select, update or delete records, you may use where clause to filter records on which operation will be performed. It is to filter result set on the basis of some criteria, or you may say that it will fetch only those records that fulfill criteria.


Select column(s) From Table_Name 
     Where column = value


"=" can be replaced with any of the following operators.

=Equal
<> or !=Not equal
>Greater than
<Less than
>=Greater than or equal
<=Less than or equal
BETWEENBetween an inclusive range
LIKESearch for a pattern
INIf you know the exact value you want to return for at least one of the columns

No comments:

Post a Comment