Loading lesson path
Concept visual
Start at both ends
operator is used in the WHERE
clause to return all records that DO NOT match the specified criteria. It reverses the result of a condition from true to false and vice-versa.The following SQL selects all customers that are NOT from Spain:
Select only the customers that are NOT from Spain:
SELECT * FROM Customers
WHERE NOT Country = 'Spain';In the example above, the NOT operator is used in combination with the = operator.
operator is also used in combination with other operators to exclude data, such as: NOT LIKE NOT BETWEEN NOT IN IS NOT NULL
column1, column2, ...
table_name
condition
;Customers table used in the examples:
Obere Str. 57
12209
Avda. de la Constitución 2222 México D.F. 05021