๐ŸŒ
W3Schools
w3schools.com โ€บ sql โ€บ sql_null_values.asp
SQL NULL Values - IS NULL and IS NOT NULL
The IS NOT NULL operator is used to test for non-empty values (NOT NULL values). The following SQL lists all customers with a value in the "Address" field:
๐ŸŒ
W3Schools
w3schools.com โ€บ sql โ€บ sql_notnull.asp
SQL NOT NULL Constraint
String Functions: Asc Chr Concat ... SQL Syllabus SQL Study Plan SQL Training ... The NOT NULL constraint enforces a column to NOT accept NULL values....
๐ŸŒ
Mimo
mimo.org โ€บ glossary โ€บ sql โ€บ is-not-null
SQL IS NOT NULL Condition: Syntax, Usage, and Examples
The SQL IS NOT NULL condition checks whether a column contains a value rather than being empty. In SQL, a NULL represents missing or undefined dataโ€”not the number zero, an empty string, or false.
๐ŸŒ
Programiz
programiz.com โ€บ sql โ€บ is-null-not-null
SQL IS NULL and IS NOT NULL (With Examples)
However, space and 0 are not considered NULL. In SQL, the IS NOT NULL condition is used to select rows if the specified field is NOT NULL.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ sql โ€บ sql-not-null-constraint
SQL NOT NULL Constraint - GeeksforGeeks
In SQL, NOT NULL constraint in SQL ensures a column must always contain a value and cannot be left empty. Unlike a PRIMARY KEY, which uniquely identifies each record and also disallows NULLs, NOT NULL only enforces the presence of data without ...
Published: 2 weeks ago
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ sql โ€บ t-sql โ€บ queries โ€บ is-null-transact-sql
IS [NOT] NULL (Transact-SQL) - SQL Server | Microsoft Learn
July 20, 2026 - ... If the value of expression is NULL, IS NULL returns TRUE; otherwise, it returns FALSE. If the value of expression is NULL, IS NOT NULL returns FALSE; otherwise, it returns TRUE.
๐ŸŒ
Hightouch
hightouch.com โ€บ sql-dictionary โ€บ sql-is-not-null
SQL IS NOT NULL - Syntax, Use Cases, and Examples | Hightouch
December 29, 2023 - The SQL IS NOT NULL operator is used to filter rows in a database table where a specified column's value is not NULL. It is the opposite of the IS NULL operator.
๐ŸŒ
DB Vis
dbvis.com โ€บ thetable โ€บ sql-is-not-null-condition-definitive-guide
SQL IS NOT NULL Condition: Definitive Guide
August 13, 2025 - Letโ€™s dive in! IS NOT NULL is an SQL condition used to check whether a value, expression, or column does not contain a NULL value.
Find elsewhere
๐ŸŒ
W3Schools
w3schools.com โ€บ sql โ€บ sql_ref_not_null.asp
SQL NOT NULL
String Functions: Asc Chr Concat ... SQL Syllabus SQL Study Plan SQL Training ... The NOT NULL constraint enforces a column to not accept NULL values, which means that you cannot insert or update a record without adding a value ...
๐ŸŒ
Reddit
reddit.com โ€บ r/sql โ€บ need some knowledge on null and not null
r/SQL on Reddit: Need some knowledge on NULL and NOT NULL
December 22, 2021 -
  • Where and why exactly a null is used?

  • What is exactly null and not null? To my understanding Not null we use when its mandatory to insert some value in that field, also when we give check constraint so by default the column will be not null right?

  • By adding new column through alter method default values are null, so how would I be able to insert values in it and is it right to give not null constraint to that new column while adding through alter method, basically when null and when not null to be used?...

god this is so confusing please help me, ik im asking alot but im really confused

๐ŸŒ
W3Schools
w3schools.com โ€บ sql โ€บ sql_ref_is_not_null.asp
SQL IS NOT NULL
String Functions: Asc Chr Concat ... SQL Syllabus SQL Study Plan SQL Training ... The IS NOT NULL command is used to test for non-empty values (NOT NULL values)....
๐ŸŒ
W3Schools
w3schools.com โ€บ mysql โ€บ mysql_null_values.asp
MySQL NULL Values - IS NULL and IS NOT NULL
The IS NOT NULL operator is used to test for non-empty values (NOT NULL values). The following SQL lists all customers with a value in the "Address" field:
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ sql โ€บ sql-is-not-null.htm
SQL - IS NOT NULL Operator
The IS NOT NULL operator in SQL is used to check whether a column contains a non-null value. In SQL, NULL represents missing, undefined, or unknown data, it is not the same as zero, an empty string, or a space.
๐ŸŒ
MSSQLTips
mssqltips.com โ€บ home โ€บ sql is null and sql is not null examples
SQL Is Null and SQL Is Not Null: Understanding NULL Values
May 27, 2026 - Instead, use the IS operator. It is also important to remember that NULL, by itself, is a SQL keyword. Do not put quotes on the word NULL or SQL Server will look for the word NULL rather than a NULL value.
๐ŸŒ
Hightouch
hightouch.com โ€บ sql-dictionary โ€บ sql-not-null
SQL NOT NULL - Syntax, Use Cases, and Examples | Hightouch
December 29, 2023 - A NOT NULL constraint in SQL is a database constraint that ensures a column must always contain a value. It prohibits the insertion of NULL values, making it mandatory for every row to have a non-null value in the specified column.
๐ŸŒ
Alma Better
almabetter.com โ€บ bytes โ€บ tutorials โ€บ sql โ€บ not-null-in-sql
NOT NULL in SQL
June 22, 2023 - NOT Null could be a type of data constraint utilized in Structured Query Language (SQL) to guarantee that a column will never contain a Invalid esteem. It prevents clients from entering invalid information into a database table.
๐ŸŒ
TechOnTheNet
techonthenet.com โ€บ sql_server โ€บ is_not_null.php
SQL Server: IS NOT NULL Condition
This SQL Server IS NOT NULL example will return all records from the employees table where the last_name does not contain a null value. Let's look at an example of how to use the IS NOT NULL condition in an INSERT statement in SQL Server.
๐ŸŒ
Oracle
docs.oracle.com โ€บ en โ€บ database โ€บ other-databases โ€บ nosql-database โ€บ 26.1 โ€บ sqlreferencefornosql โ€บ is-null-and-is-not-null-operators.html
IS NULL and IS NOT NULL Operators
2 weeks ago - If the input expression returns more than one item, an error is raised. If the result of the input expression is empty, IS NULL returns false. Otherwise, IS NULL returns true if and only if the single item computed by the input expression is NULL. The IS NOT NULL operator is equivalent to NOT ...
Top answer
1 of 3
34

There is no difference.

It seems to me that there might be a difference when it comes to performance. Anyone care to elaborate on this?

All major engines (that is MySQL, SQL Server, Oracle and PostgreSQL) will merge these predicates on parsing stage, making identical plans from them.

Handling of these conditions is more complex that mere applying operators in one or another order.

For instance, in Oracle, an IS NOT NULL (or NOT IS NULL) condition implies a possibility to use an index, so a query like this:

SELECT  column
FROM    mytable
WHERE   column IS NOT NULL

will most probably be executed with an index fast full scan, with no additional checks made in runtime (since the NULL values just won't make it into the index, so it's no use to check them).

Even if each record would need to be checked, the order of checks will be defined by the optimizer (and not by the order the predicates and operators appear in the WHERE clause).

For instance, here is a plan for an Oracle query:

SQL> EXPLAIN PLAN FOR
  2  
  2  SELECT *
  3  FROM   t_test
  4  WHERE  NOT column IS NULL
  5  /

Explained

SQL> SELECT  *
  2  FROM    TABLE(DBMS_XPLAN.display())
  3  /

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 958699830
----------------------------------------------------------------------------
| Id  | Operation         | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |        |    30 |  1260 |     3   (0)| 00:00:01 |
|*  1 |  TABLE ACCESS FULL| T_TEST |    30 |  1260 |     3   (0)| 00:00:01 |
----------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
   1 - filter("COLUMN" IS NOT NULL)

As you can see, the filter was translated internally into an IS NOT NULL (which Oracle along with most commenters seems to believe to be a more appropriate form)

Update:

As Jonathan Leffler pointed out, these is difference when evaluating tuples (as opposed to single columns).

A tuple consisting of mixed NULL and non-NULL values is neither a NULL nor a NOT NULL.

In PostgreSQL (which supports this predicate against tuples), both these expressions:

SELECT  (1, NULL) IS NULL
SELECT  (1, NULL) IS NOT NULL

evaluate to false.

2 of 3
18

IS NOT NULL is a comparison operator, just like IS NULL or =, >, <, etc.

NOT is a logical operator that acts on the rest of the condition. So you can say NOT type = 5, NOT type IS NULL, or even NOT type IS NOT NULL.

My point here is to point out that they are two very different operators, even though the result is the same. Of course, in boolean logic, there is no difference between NOT (column IS NULL) and column IS NOT NULL, but it's wise to know the difference.

As for performance, IS NOT NULL might save you a few cycles over NOT ... IS NULL because you are using a single operator instead of two operators, but any reasonable optimizer will figure out they are the same thing before the query is run.

๐ŸŒ
Programiz
programiz.com โ€บ sql โ€บ not-null
SQL NOT NULL Constraint (With Examples)
In SQL, the NOT NULL constraint in a column means that the column cannot store NULL values. -- create table with NOT NULL constraint CREATE TABLE Colleges ( college_id INT NOT NULL, college_code VARCHAR(20), college_name VARCHAR(50) ); Here, the college_id column of the Colleges table won't ...