How can I remove padded NULL bytes using SELECT in MySQL
Use trim(), which comes in 3 flavours:
select trim(leading CHAR(0x00) from data)
or
select trim(trailing CHAR(0x00) from data)
or
select trim(both CHAR(0x00) from data)
Use trim(), which comes in 3 flavours:
select trim(leading CHAR(0x00) from data)
or
select trim(trailing CHAR(0x00) from data)
or
select trim(both CHAR(0x00) from data)