Not Equal(<>) Constraint



Syntax:

SELECT Column(s)
FROM TableName
WHERE Column <> Value;



What does it do?

The Not Equal constraint restrics the rows slected to only rows where the data in the column does not match the value that is used in the Not Equals expression.


Example:

SELECT FirstName, LastName
FROM Customers
WHERE FirstName <> 'John';


Results: All rows where the customer's first name is not John are returned.

FirstName LastName
Jane Doe
Jack Jackson
Jill Brown
Kelly Davis
HTML 5 Badge