In SQL, the <>
operator is used to check for inequality between two values. It returns true if the two values are not equal and false if they are equal.
Here's a basic example:
SELECT * FROM products WHERE price <> 100;
This query retrieves all products from the products
table where the price is not equal to 100.
You can also use <>
in combination with other operators and clauses in SQL queries to perform more complex filtering and comparisons.