Top Menu

Search This Blog

SQL WHERE Clause

The WHERE clause is used to filter records by conditionally.

The WHERE clause is used to select only those records that fulfill a specified syntax.

Syntax:


 SELECT column_1_name,column_2_name
 FROM table_name
 WHERE column_name operator value

This operators use in The WHERE Clause.

Operator Description
= Equal
<> or != Not equal.
> Greater than
< Less than
>= Greater than or equal
<= Less than or equal
BETWEEN Between an inclusive range
LIKE Search for a pattern
IN To specify multiple possible values for a column

As you see, we have like this "Candidate" table.











The following SQL syntax selects all the Candidate from the LastName "patel", in the "Candidate" table.

Example:


SELECT * FROM CANDIDATE WHERE LastName='patel'

Output:


Post a Comment

Designed by OddThemes | Distributed By Gooyaabi Templates