oracle 中怎么实现100次循环插入,并且其中一列自增1

oracle 中怎么实现100次循环插入,并且其中一列自增1,第1张

create or replace procedure p_test (i_str in varchar)is

v_str varchar2(100)

i number

begin

select i_str into v_str from dual

i:=0

for i in 1..100 loop

insert into test

select i,'00'

from dual

end loop

commit

end p_test

insert into abook2 values (idx, val + idx)

Oracle 字符串连接, 不用 + , 用的是 ||

insert into abook2 values (idx, val || TO_CHAR( idx ) )


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11240739.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-14
下一篇2023-05-14

发表评论

登录后才能评论

评论列表(0条)

    保存