- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How MySQL NULL-safe equal operator performs when used with 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