I have a situation where i need to get the integer value from a literal hex. Example: "ff" equals 255 in decimal, but if i use the HEX("ff") function it returns 6666. Is it possible to get it to return 255? Like a=10, b=11... and so on
Thank you
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityIf you need to convert hexadecimal representation to decimal one then you must use CONV() function.
SELECT CONV('ff', 16, 10);
| CONV('ff', 16, 10) | | :----------------- | | 255 |
db<>fiddle here