- 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
What MySQL returns if I provide a non-hexadecimal number as an argument to UNHEX() function?
MySQL returns NULL if we provide any non-hexadecimal number as an argument to UNHEX() function. Following example will demonstrate it.
Example
mysql> Select UNHEX('ANK96598'); +-------------------+ | UNHEX('ANK96598') | +-------------------+ | NULL | +-------------------+ 1 row in set (0.00 sec)
As we know that the valid hexadecimal digits are between ‘0…9’, ‘A…F’ or ‘a…f’ hence the above query returns NULL.
Advertisements