NOT IN Operator in SQL
Level 252 keystrokes
NOT IN excludes rows where the value matches any value in the list.
SQL code
1SELECT -- Returns the name of each remaining product2 name3FROM4 products5WHERE -- NOT IN excludes the products with id 1, 3 or 5 -- Beware: if the list contained NULL, no row would match6 id NOT IN (1, 3, 5);Output
+--------+ | name | +--------+ | Gadget | | Widget | +--------+ 2 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.
,× 2;× 1(× 1)× 1