Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Returning all data from a table
Select some columns
Filtering rows
7. The inequality operator (!=)
Logic
Text patterns
To be or NULL to be
A bit of mathematics
Let's practice

Instruction

Fantastic! There is one more very important conditional operator – the inequality operator (!= or sometimes <>). Look at the example:

SELECT
  *
FROM User
WHERE Age != 18;

See how easy it is? We used the inequality operator (!=) to select all users who aren't 18 years old.

Exercise

Select all columns for cars that weren't produced in 1999.

Stuck? Here's a hint!

Type:

SELECT
  *
FROM Car
WHERE ProductionYear != 1999;