IN Operator in SQL
Level 377 keystrokes
IN operator checks if a value matches any value in a list.
SQL code
1SELECT -- Returns the name and country columns2 name,3 country4FROM5 users6WHERE -- IN keeps rows whose country is USA, Canada or Mexico -- Same as three conditions joined with OR7 country IN ('USA', 'Canada', 'Mexico');Output
+-------+---------+ | name | country | +-------+---------+ | Alice | USA | | Bob | Canada | | Carol | Mexico | +-------+---------+ 3 rows in set
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this SQL code and how often they appear.
'× 6,× 3;× 1(× 1)× 1