MySQL ISNULL( ) Function Last Updated : 12 Jul, 2025 Comments Improve Suggest changes 1 Likes Like Report The MySQL ISNULL() function is used for checking whether an expression is NULL or not. This function returns 1 if the expression passed is NULL; otherwise, it returns 0. The ISNULL() function in MySQL accepts the expression as a parameter and returns an integer with a value of a value 0 or 1 depending on the parameter passed. SyntaxMySQL ISNULL() function syntax is: ISNULL(expression) Parameters: expression - It is used to specify the expression. Supported Versions of MySQLThe MySQL ISNULL function is supported on following versions: MySQL 5.7MySQL 5.6MySQL 5.5MySQL 5.1MySQL 5.0MySQL 4.1MySQL 4.0MySQL 3.23MySQL ISNULL( ) Function ExampleLet's look at some examples of the ISNULL() function in MySQL. Learning the ISNULL() function with examples will help in understanding the concept better. Example 1 Implementing ISNULL() function. SELECT ISNULL(NULL); Output: 1 Example 2 Implementing ISNULL() function on a string. SELECT ISNULL("gfg"); Output: 0 Example 3 Implementing ISNULL() function on an integer value. SELECT ISNULL(123); Output: 0 Important Points About MySQL ISNULL() FunctionThe ISNULL() function is used to check if a value is NULL or not.It returns 1 if the expression is NULL, otherwise it returns 0.It can be used in SELECT, WHERE, and other clauses.It is different from the IFNULL() function, which is the MySQL equivalent of SQL Server's ISNULL().It is useful for handling NULL values in queries and filtering rows where a column is NULL or not NULL. Create Quiz Comment S Shubrodeep Banerjee Follow 1 Improve S Shubrodeep Banerjee Follow 1 Improve Article Tags : SQL mysql SQLmysql Explore BasicsWhat is SQL?6 min readSQL Data Types3 min readSQL Operators4 min readSQL Commands | DDL, DQL, DML, DCL and TCL Commands4 min readSQL Database Operations3 min readSQL CREATE TABLE3 min readQueries & OperationsSQL SELECT Query3 min readSQL INSERT INTO Statement4 min readSQL UPDATE Statement3 min readSQL DELETE Statement3 min readSQL - WHERE Clause2 min readAliases in SQL2 min readSQL Joins & FunctionsSQL Joins (Inner, Left, Right and Full Join)4 min readSQL CROSS JOIN1 min readSQL | Date Functions3 min readSQL | String functions6 min readData Constraints & Aggregate FunctionsSQL NOT NULL Constraint2 min readSQL PRIMARY KEY Constraint5 min readSQL Count() Function4 min readSQL SUM() Function2 min readSQL MAX() Function3 min readAVG() Function in SQL2 min readAdvanced SQL TopicsSQL Subquery5 min readWindow Functions in SQL6 min readSQL Stored Procedures7 min readSQL Triggers5 min readSQL Performance Tuning6 min readSQL TRANSACTIONS6 min readDatabase Design & SecurityIntroduction of ER Model9 min readIntroduction to Database Normalization6 min readSQL Injection11 min readSQL Data Encryption5 min readSQL Backup4 min readWhat is Object-Relational Mapping (ORM) in DBMS?7 min read Like