码迷,mamicode.com
首页 > 数据库 > 详细

Oracle函数+for循环

时间:2014-06-28 22:16:48      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:blog   cti   for   c   io   sql   

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;

  

Oracle函数+for循环,布布扣,bubuko.com

Oracle函数+for循环

标签:blog   cti   for   c   io   sql   

原文地址:http://www.cnblogs.com/alphafly/p/3794394.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!