因工作需求,想让base64编码的字段全部解码存储,没想到mysql支持该函数
1、to_base64 编码
如: select to_base64('12345');
2、from_base64 解码
如:select from_base64('MTIzNDU=');
select ability.* from comp_ability ability where ability.req_description like 'PCE%' or ability.resp_description like 'PCE%' ; CREATE table comp_ability_bak1019 as select * from comp_ability; UPDATE comp_ability SET req_description = FROM_BASE64(req_description) WHERE req_description LIKE 'PCE%' ;