OR

A condition operator that is true if at least one of the conditions holds.

sql
WHERE rating = 'PG' OR rating = 'G'

When to use

Used inside WHERE to accept alternatives, for example two ratings. In the study guide, AND binds tighter than OR, so brackets are needed when you mean (a OR b) AND c.

See Read 01.

Appears in

No references yet.