Mark As Completed Discussion

Or

The OR operator can be used in SQL for getting all rows that satisfy at least one of the conditions that are separated by OR. With this operator, filtering can be conducted on more than one condition.

Let’s say we want to find all people that live in either the United States of America, Spain, or Denmark. Then, we’d have to write the following query:

TEXT/X-SQL
1SELECT * 
2FROM Person
3WHERE Country == ‘USA’ OR Country == ‘Spain’ OR Country == ‘Denmark’;

The resulting table would look like this:

Or