×

sql · level 1 · unit 2 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

Ask for more than, less than, or not equal to.

= only finds exact matches. Often you want a range instead, like every snack under a pound. A does that, with an between a column and a value.

< means less than and > means more than. <= means less than or equal to, and >= means more than or equal to. <> means not equal to.

Prices in the snacks table are in pence, so price < 100 finds every snack under a pound.

SELECT name, price FROM snacks WHERE price < 100;

In <= and >= the = always comes second, never first.