What is the default type of a hexadecimal value in MySQL?


As we know that in numeric contexts the hexadecimal values act like integers and in string contexts they act like binary string. It can be understood with the help of the following example,

mysql> Select X'5455544F5249414C53504F494E54';
+---------------------------------+
| X'5455544F5249414C53504F494E54' |
+---------------------------------+
| TUTORIALSPOINT                  |
+---------------------------------+
1 row in set (0.07 sec)

But, if we are talking about default type of hexadecimal value in MySQL, then it is a string.

Updated on: 11-Feb-2020

137 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements