
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
MySQL NULL-safe Equal Operator in Row Comparisons
When we use NULL-safe operator with row comparisons like (A, B) <=> (C, D) then its performance is equivalent to (A <=> C) AND (B <=> D). Following example will demonstrate it −
mysql> Select (100,50) <=> (50,100); +-----------------------+ | (100,50) <=> (50,100) | +-----------------------+ | 0 | +-----------------------+ 1 row in set (0.00 sec) mysql> Select (100,50) <=> (100,50); +-----------------------+ | (100,50) <=> (100,50) | +-----------------------+ | 1 | +-----------------------+ 1 row in set (0.00 sec)
The above result sets show how NULL-safe operators can be used with row comparison.
Advertisements