WHERE Filtering Clause

Function

This statement is used to filter the query results using the WHERE clause.

Syntax

1
2
SELECT [ALL | DISTINCT] attr_expr_list FROM table_reference
  WHERE where_condition;

Keyword

Precautions

The to-be-queried table must exist.

Example

To filter the records in which the scores are higher than 90 and lower than 95 in the student table, run the following statement:

1
2
SELECT * FROM student
  WHERE score > 90 AND score < 95;