插入1000随机数据
各位老师好:
     我写的这个过程是想在passwd这个表插入1000个随机数
但是每次只会插一条数据。。。不明白 还望讲解。。。
谢谢额
declare
   cursor cur_phone is
    select count(c_passwd) as v_cc from passwd;--看是否到1000了
   v_content varchar2(255);
   v_id      float := 1;
begin
   for data in cur_phone loop     
   --  select HIBERNATE_SEQUENCE.Nextval into v_id from dual;
     if data.v_cc <1000 then      
       insert into passwd
         (c_passwd)
         select abs(dbms_random.random) from dual;      
     end if;
   end loop;
   --commit;
end;
------解决方案--------------------
SQL code
select lpad(abs(dbms_random.random),10,0) from dual CONNECT BY ROWNUM<1000