SQL

Basic WHERE Clause

Filtering Data with WHERE

The WHERE clause filters rows based on a condition.

Syntax

SELECT columns FROM table_name
WHERE condition;

Comparison Operators

OperatorMeaning
=Equal to
>Greater than
<Less than
>=Greater than or equal
<=Less than or equal
<> or !=Not equal

Your Task

Select all products where the category is 'Electronics'.

query.sql
Loading SQL engine...
Downloading SQL engine… (one-time)

Downloading SQL engine… (one-time)

This runs entirely in your browser and is cached for next time.