SQL Tutorial

SQL WHERE Clause

SQL WHERE clause is used with SQL SELECT statement to specifies the search conditions of a query. When you execute a query with SQL WHERE clause, the database server searches for records in the database table(s) which meets your search conditions. SQL provides a variety of search conditions which you can use with SQL WHERE clause as follows:

  • Comparison operators (=,>,<,.>=,<=,<>)
  • Combinations or logical negations with (AND, OR, NOT)
  • Ranges with (BETWEEN and NOT BETWEEN)
  • Lists with (IN, NOT IN)
  • Character matches with LIKE