

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the benefit of MySQL ‘IS NULL’ and ‘IS NOT NULL’?
As we know that while using NULL with a comparison operator, we would not get any meaningful result set. To get the meaningful result from such kind of comparisons, we can use ‘IS NULL’ and ‘IS NOT NULL’.
Example
mysql> Select 10 IS NULL; +------------+ | 10 IS NULL | +------------+ | 0 | +------------+ 1 row in set (0.00 sec) mysql> Select 10 IS NOT NULL; +----------------+ | 10 IS NOT NULL | +----------------+ | 1 | +----------------+ 1 row in set (0.00 sec)
The MySQL statements above show the use of ‘IS NULL’ and ‘IS NOT NULL’. We got the result in Boolean values either 0 (for FALSE) or 1(for TRUE) which is certainly a meaningful result.
- Related Questions & Answers
- What is the use of ‘ALL’, ‘ANY’, ’SOME’, ’IN’ operators with MySQL subquery?
- Why in MySQL, we cannot use arithmetic operators like ‘=’, ‘<’ or ‘<>’ with NULL?
- What is the significance of ‘^’ in PHP?
- What is the purpose of ‘is’ operator in C#?
- Validate input: replace all ‘a’ with ‘@’ and ‘i’ with ‘!’JavaScript
- Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’ in C++
- In MySQL what is the difference between != NULL and IS NOT NULL?
- What is ‘this’ reference in Java?
- TypeError: ‘undefined’ is not an object in JavaScript
- What is the use of ‘new’ keyword in C#?
- What is the use of ‘Using’ statement in C#?
- What is the purpose of ‘as’ operator in C#?
- What is the use of ‘\c’ option while writing MySQL statements?
- What is the meaning of ‘empty set’ in MySQL result set?
- On inserting ‘NULL’, ‘0’ or No Value to the column, will MySQL assign sequence number for AUTO_INCREMENT column?
Advertisements