Professional Documents
Culture Documents
▪ The WHERE clause is not only used in SELECT statement, but it is also
used in UPDATE, DELETE statement, etc
SQL WHERE Clause
▪ Example 3
SELECT last_name
FROM employees
WHERE hire_date = '17-FEB-96' ;
Comparison Operators
Operator Meaning
= Equal to
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
<> Not equal to
BETWEEN Between two values (inclusive)
...AND...
SELECT first_name
FROM employees
WHERE first_name LIKE 'S%' ;
Combining Wildcard Characters
Operator Meaning
AND Returns TRUE if both component conditions
are true
OR Returns TRUE if either component condition
is true
NOT Returns TRUE if the condition is false
The AND Operator:
The AND operator allows the existence of multiple conditions in an SQL
statement's WHERE clause.
Syntax:
The basic syntax of AND operator with WHERE clause is as follows:
Syntax:
The basic syntax of OR operator with WHERE clause is as follows:
9 OR logical condition
▪ Syntax:
The basic syntax of ORDER BY clause is as follows:
…
Sorting