declare
CURSOR l_c IS select classid from cjt_class;
Begin
   FOR i IN l_c LOOP
    update cjt_class t set t.orders = substr(i.classid,0,4) where t.classid = i.classid;
   END LOOP;
End;

  根据截取的字符串更新信息;

posted on 2016-07-01 16:34  呆萌小码  阅读(2004)  评论(0编辑  收藏  举报