Operators for WHERE Flashcards
What does this symbol represent =
Equals
Example
SELECT city FROM world
WHERE city = ‘London’
What does this symbol represent >
Greater Than
Example
SELECT population FROM world
WHERE population > 100
What does this symbol represent
Less Than
Example
SELECT population FROM world
WHERE population < 100
What does this symbol represent >=
Greater than or equal
Example
SELECT population FROM world
WHERE population >= 100
What does this symbol represent <=
Less than or equal
Example
SELECT population FROM world
WHERE population <= 100
What does this symbol represent <>
Not Equal
Example
SELECT population FROM world
WHERE population <> 100
What does this symbol represent BETWEEN
Between a range
Example
SELECT population FROM world
WHERE population BETWEEN 100 and 200
What does this symbol represent LIKE
Search for a pattern
Example
SELECT city FROM world
WHERE city LIKE ‘%Lon%’
What does this symbol represent IN
specify multiple possible values for a column
Example
SELECT city FROM world
WHERE city IN (‘London’, ‘France’, ‘Germany’)