If data is inserted this way,
insert into `t` (`date`, `data`) values ( now(), lpad('Hello', 4096, CHAR(0x00)));
How do you retrive it removing NULL characters from data
column. I am infact looking for something that does the reverse of what LPAD
does.
The table definition is,
create table `t` (
`id` int auto_increment,
`date` datetime,
`data` blob,
primary key (`id`)
);
Generalized question is, How can I remove an specific character from either beginning or ending of a string?