Hi,
When i run select hex(col1) from table1; i get the result as hex number
for ex: the hex(65) is 41, but i wish to get directly thro sql query the result as 0x41 instead of 41, is there a way to get the result as 0x41?
Hi,
When i run select hex(col1) from table1; i get the result as hex number
for ex: the hex(65) is 41, but i wish to get directly thro sql query the result as 0x41 instead of 41, is there a way to get the result as 0x41?
select '0x' + hex(col1) from table1
Update:
I misread the tag and answered with the +
operator as used in for MS-SQL. As Sharpeye says in the comment,
select concat('0x',hex(col1)) from table1
is the MySQL version.