create or replace function FilterMinganci(str in varchar) return varchar2 is filterWorld varchar2(1000); keyCount int; begin filterWorld := str; keyCount := 0; select count(1) into keyCount from dic_keyword; for aa in (select keyword from dic_keyword) loop select replace(filterWorld, aa.keyword, ‘*‘) into filterWorld from dual; keyCount := keyCount - 1; exit when keyCount = 0; end loop; return(filterWorld); end;
原文地址:http://www.cnblogs.com/alphafly/p/3794394.html