Excluding Rows with NOT
Sometimes it's easier to say what you don't want.
Use != for "not equal" (<> means the same thing):
NOT flips any condition you already know:
You've already seen one of these: IS NOT NULL.
Watch out: != never matches NULL. Alice and Robert have no manager, so this quietly leaves them out:
To keep them, check for NULL as well:
Check your understanding
List the first name of every employee who is not in department 1.
Examples run on the employees sample database. Open any of them in the playground to experiment.