MicrolearnENPTES

AND, OR and NOT

Lesson 5 of 24 · SQL.Micro

Real questions have several conditions. AND requires all of them, OR at least one, NOT inverts one.

WHERE category = 'Electronics' AND price < 100

AND is evaluated before OR. Use parentheses to make your intention clear.

NOT status = 'cancelled' is the same as status <> 'cancelled'.

WHERE a = 1 OR b = 2 AND c = 3 is read as…

Show name and price of Electronics products that cost less than 100.

Do it in the browser: a real SQL tool, a short mission and instant feedback. No install.

Start this lesson — free
← Sorting and limitingIN and BETWEEN →

All lessons · SQL.Micro