All for Joomla All for Webmasters

SQL WHERE

A WHERE clause in SQL is a data manipulation language statement.

WHERE clauses are not mandatory clauses of SQL DML statements. But it can be used to limit the number of rows affected by a SQL DML statement or returned by a query.

Actually. it filters the records. It returns only those queries which fulfill the specific conditions.

WHERE clause is used in SELECT, UPDATE, DELETE statement etc.

Let’s see the syntax for sql where:

  1. SELECT column1, column 2, … column n
  2. FROM    table_name
  3. WHERE [conditions]

WHERE clause uses some conditional selection

= equal
> greater than
< less than
>= greater than or equal
<= less than or equal
< > not equal to
PinIt
submit to reddit

Leave a Reply

Top