<> is Standard SQL-92; != is its equivalent. Both evaluate for values, which NULL is not -- NULL is a placeholder to say there is the absence of a value.

Which is why you can only use IS NULL/IS NOT NULL as predicates for such situations.

This behavior is not specific to SQL Server. All standards-compliant SQL dialects work the same way.

Note: To compare if your value is not null, you use IS NOT NULL, while to compare with not null value, you use <> 'YOUR_VALUE'. I can't say if my value equals or not equals to NULL, but I can say if my value is NULL or NOT NULL. I can compare if my value is something other than NULL.

Answer from OMG Ponies on Stack Overflow
🌐
W3Schools
w3schools.com › sql › sql_not.asp
SQL NOT Operator
String Functions: Asc Chr Concat ... SQL Certificate SQL Training ... The NOT operator is used in the WHERE clause to return all records that DO NOT match the specified criteria....
🌐
Hightouch
hightouch.com › sql-dictionary › sql-not-equal-to
SQL Not Equal To - Syntax, Use Cases, and Examples | Hightouch
January 3, 2024 - The SQL "Not Equals To" operator, denoted as "<>", "!=", or "NOT =", is used to compare values in a database table and retrieve rows where a specific column's value does not match a given criteria.
Discussions

sql - Not equal <> != operator on NULL - Stack Overflow
All standards-compliant SQL dialects work the same way. Note: To compare if your value is not null, you use IS NOT NULL, while to compare with not null value, you use <> 'YOUR_VALUE'. I can't say if my value equals or not equals to NULL, but I can say if my value is NULL or NOT NULL. More on stackoverflow.com
🌐 stackoverflow.com
sql server - Should I use != or <> for not equal in T-SQL? - Stack Overflow
I have seen SQL that uses both != and for not equal. What is the preferred syntax and why? I like !=, because reminds me of Visual Basic. More on stackoverflow.com
🌐 stackoverflow.com
help in finding an equal sign that is not surrounded by a whitespace
I'm just passing by to remind you about !=, ==, <=, =~ or whatever else your language might have More on reddit.com
🌐 r/regex
6
4
February 18, 2022
Need some knowledge on NULL and NOT NULL
a null is used for multiple purposes -- for example, not known, not applicable, etc. theoreticians take great joy in debating which uses are valid, and whether they can be substituted by some non-null placeholder suffice to say, a null is used when you don't know what value should go there if you don't want that situation to arise, just make the column NOT NULL and you'll never be able to not insert an actual value More on reddit.com
🌐 r/SQL
32
14
December 23, 2021
🌐
GeeksforGeeks
geeksforgeeks.org › sql › sql-not-equal-operator
SQL NOT EQUAL Operator - GeeksforGeeks
November 17, 2025 - The SQL NOT EQUAL operator compares two values and returns true if they are not equal. It’s used to filter out matching records in queries. If the values are equal, it returns false; if either value is NULL, it returns NULL.
🌐
SQL Shack
sqlshack.com › sql-not-equal-operator
SQL Not Equal Operator introduction and examples
May 21, 2021 - We can use both SQL Not Equal operators <> and != to do inequality test between two expressions. Both operators give the same output. The only difference is that ‘<>’ is in line with the ISO standard while ‘!=’ does not follow ISO standard.
Find elsewhere
🌐
DataCamp
datacamp.com › tutorial › sql-not-equal
SQL NOT EQUAL Operator: A Beginner's Guide | DataCamp
December 10, 2024 - It can be used in the WHERE clause to specify rows to be updated based on non-equality. UPDATE employees SET salary = salary * 1.1 WHERE job_id != 'Manager'; It can be used in the WHERE clause to identify rows to delete where the condition is true. ... Let's delve deeper into the practical application of the SQL NOT EQUAL operator with expanded examples that demonstrate its versatility and power in querying databases.
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › language-elements › not-equal-to-transact-sql-traditional
&lt;&gt; (Not Equal To) (Transact-SQL) - SQL Server | Microsoft Learn
Applies to: SQL Server Azure SQL ... comparison operator). When you compare nonnull expressions, the result is TRUE if the left operand is not equal to the right operand; otherwise, the result is FALSE....
🌐
W3Schools
w3schools.com › sql › sql_operators.asp
SQL Operators
String Functions: ASCII CHAR_LENGTH CHARACTER_LENGTH CONCAT CONCAT_WS FIELD FIND_IN_SET FORMAT INSERT INSTR LCASE LEFT LENGTH LOCATE LOWER LPAD LTRIM MID POSITION REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPACE STRCMP SUBSTR SUBSTRING SUBSTRING_INDEX TRIM UCASE UPPER Numeric Functions: ABS ACOS ASIN ATAN ATAN2 AVG CEIL CEILING COS COT COUNT DEGREES DIV EXP FLOOR GREATEST LEAST LN LOG LOG10 LOG2 MAX MIN MOD PI POW POWER RADIANS RAND ROUND SIGN SIN SQRT SUM TAN TRUNCATE Date Functions: ADDDATE ADDTIME CURDATE CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURTIME DATE DATEDIFF DATE_ADD DATE_FORMAT DA
🌐
Mimo
mimo.org › glossary › sql › not-equal
SQL Not Equal: Syntax, Usage, and Examples
Avoid comparing with NULL using <> or !=. Use IS NOT NULL instead. Use indexes wisely. Not equal conditions often cause full table scans. Be explicit in your logic. Don’t assume that <> 'admin' means non-users. It means everything except 'admin'. The SQL not equal operator gives you direct control over what to leave out in your result sets.
🌐
Tutorialspoint
tutorialspoint.com › sql › sql-not-equal.htm
SQL - NOT EQUAL Operator
The SQL NOT EQUAL operator is used to compare two values and return TRUE if they are not the same. It is represented by "<>" and "!=". The difference between these two is that <> follows the ISO standard, but != doesn't.
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › language-elements › not-equal-to-transact-sql-exclamation
!= (Not Equal To) (Transact-SQL) - SQL Server | Microsoft Learn
November 18, 2025 - Applies to: SQL Server Azure SQL ... in Microsoft Fabric SQL database in Microsoft Fabric · Tests whether one expression is not equal to another expression (a comparison operator)....
🌐
DB Vis
dbvis.com › thetable › sql-not-equal-operator-definitive-guide-with-examples
SQL Not Equal Operator: Definitive Guide with Examples
October 14, 2024 - How could you do that? With the SQL not equal operator! That special comparison operator allows you to apply conditions that records do not have to meet in order to be selected. In other terms, it is the opposite of the SQL equal = operator that we all know and love.
🌐
Codecademy
codecademy.com › docs › sql › operators › not equal to
SQL | Operators | NOT EQUAL TO | Codecademy
April 24, 2025 - This query returns all the records from the customers table where the city is not equal to ‘New York’: ... This example demonstrates how to use the NOT EQUAL TO operator with multiple conditions using logical operators: ... This query retrieves all employees who do not work in the ‘Sales’ department and have a salary greater than $50,000: ... Both <> and != are NOT EQUAL TO operators in SQL and function identically.
🌐
MariaDB
mariadb.com › docs › server › reference › sql-structure › operators › comparison-operators › not-equal
!= | Server | MariaDB Documentation
What is this page about?What should I read next?Can you give an example? ... Not equal operator. Evaluates both SQL expressions and returns 1 if they are not equal, and 0 if they are equal, or NULL if either expression is NULL.
🌐
RisingWave
risingwave.com › home › blog › mastering sql not equal operator: tips and examples
Mastering SQL Not Equal Operator: Tips and Examples | RisingWave
June 11, 2024 - On the other hand, the != syntax provides another way to represent the NOT EQUAL operator in SQL. Although it does not conform to the ISO standard, it serves the same purpose as <>, allowing users flexibility in their query expressions.
🌐
Scaler
scaler.com › home › topics › sql › not equal in sql
Not Equal in SQL - Scaler Topics
May 19, 2022 - The Not Equal in SQL is the comparison operator in SQL language that is written inside the SQL statements, and used on two expressions, if both expressions are different then the evaluation result comes out to be true, accordingly either we ...
🌐
JanbaskTraining
janbasktraining.com › home › a complete overview of sql not equal operator with examples
A Complete Overview Of SQL Not Equal Operator with Examples| JanBask Training
October 19, 2024 - The SQL operator for not equal is < >. This enables you to choose rows if a specific column's contents do not match the value you have entered. In some SQL versions, you can also use the!= operator as a not-equal statement.
🌐
W3Schools
w3schools.com › sql › sql_null_values.asp
SQL NULL Values - IS NULL and IS NOT NULL
SELECT column_names FROM table_name WHERE column_name IS NOT NULL; Below is a selection from the Customers table used in the examples: The IS NULL operator is used to test for empty values (NULL values). The following SQL lists all customers with a NULL value in the "Address" field:
🌐
Baeldung
baeldung.com › home › sql operators › difference between != and for not equal in sql
Difference Between != and for Not Equal in SQL Baeldung on SQL
April 8, 2025 - Let’s rewrite the previous query using the != operator: ... When we run this query, it returns the same results as well. In SQL Server, MySQL, and PostgreSQL, both <> and != are supported as valid operators for the not equal condition, with ...