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:
This operators use in The WHERE Clause.
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:
Output:
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
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