

- 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
Why in MySQL, we cannot use arithmetic operators like ‘=’, ‘<’ or ‘<>’ with NULL?
The reason behind it is that we will not receive any meaningful results from the comparisons when we use NULL with the comparison operators like ‘=’, ‘<’ or ‘<>’. Consider the following example which demonstrates this concept −
mysql> Select 10 = NULL, 10< NULL, 10<>NULL; +-----------+----------+----------+ | 10 = NULL | 10< NULL | 10<>NULL | +-----------+----------+----------+ | NULL | NULL | NULL | +-----------+----------+----------+ 1 row in set (0.07 sec)
The above result set is not meaningful in any sense.
- Related Questions & Answers
- What is the use of ‘ALL’, ‘ANY’, ’SOME’, ’IN’ operators with MySQL subquery?
- Validate input: replace all ‘a’ with ‘@’ and ‘i’ with ‘!’JavaScript
- ‘AND’ vs ‘&&’ operators in PHP
- What is the benefit of MySQL ‘IS NULL’ and ‘IS NOT NULL’?
- Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’ in C++
- How can we create MySQL stored procedures without ‘BEGIN’ and ‘END’?
- How to Use ‘cat’ and ‘tac’ Commands with Examples in Linux
- Are ‘this’ and ‘super’ keywords in Java?
- Replacing ‘public’ with ‘private’ in “main” in Java
- Learn Why ‘less’ is Faster Than ‘more’ Command for Effective File Navigation
- Python program to replace first ‘K’ elements by ‘N’
- Construct DFA beginning with ‘a’ but does not have substring ‘aab’
- On inserting ‘NULL’, ‘0’ or No Value to the column, will MySQL assign sequence number for AUTO_INCREMENT column?
- How can we use MySQL function STR_TO_DATE(Column, ‘%input_format’)?
- Why are South Africans called ‘Protease’?
Advertisements