Skip to content

SQL WHERE Clause

Syntax

The WHERE clause in SQL is used to specify a condition for filtering rows in a query.

-- Filter rows with a single condition
SELECT column1, column2
FROM table_name
WHERE condition;

Example

-- Filter rows with a single condition
SELECT name
FROM employees
WHERE age > 30;
/* Output:
| name |
|-------------|
| Alice Brown |
*/