阅读背景:

我在SQL中的第一个for循环

来源:互联网 
/*alter table schematics
add type_id NUMBER;*/

begin

for i in  (
select a.id,
       substr(a.key,
              instr(a.key, '|') + 1,
              (instr(a.key, '|', 1, 2) -
              (instr(a.key, '|', 1, 1) + 1))) TYPE_ID
  from schematics a)
  loop 
    update schematics
    set type_id = TYPE_ID;
  end loop;
)
end
/*alter table schematics
add type_id NUMBER;*/



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: