mysql base64编码解码

因工作需求,想让base64编码的字段全部解码存储,没想到mysql支持该函数

1、to_base64  编码

如:  select to_base64('12345');

2、from_base64 解码

如:select from_base64('MTIzNDU=');

select abi.* from abi abi where abi.req_description like 'PCE%' or abi.resp_description like 'PCE%' ; CREATE table compbak1019 as select * from abi; UPDATE abi SET req_description = FROM_BASE64(req_description) WHERE req_description LIKE 'PCE%' ;
posted @ 2020-10-19 14:53  李德东  阅读(3992)  评论(1编辑  收藏  举报