IN Operator in SQL
Level 261 keystrokes
IN operator checks if a value matches any value in a list.
SQL code
1SELECT -- Returns the name of each matching user2 name3FROM4 users5WHERE -- IN keeps rows whose status is 'active' or 'pending' -- Shorter than status = 'active' OR status = 'pending'6 status IN ('active', 'pending');Output
+-------+ | name | +-------+ | Alice | | Bob | | Carol | +-------+ 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.
'× 4,× 1;× 1(× 1)× 1