标签:ace varchar ast oracl ble pass arch upd arc
因为我们初始的数据有问题,需要批量的导入,我们创建了oracle的MD5算法,对用户名和密码进行了加密;1、写函数:
create or replace function "MD52"(passwd in varchar2) return varchar2 is
retval varchar2(32);
begin
retval := utl_raw.cast_to_raw(dbms_obfuscation_toolkit.md5(input_string => passwd));
return lower(retval);
end;
2、更新数据调用;
update usertable SET "PASSWORD" = MD52("CONCAT"(USERID,"CONCAT"(USERID,‘!@#321‘))) where password=‘Q3qtuxGsI7B5u60nFMu+qA==‘;
userid和密码同时加密
大功告成!
标签:ace varchar ast oracl ble pass arch upd arc
原文地址:http://blog.51cto.com/11964104/2070947