标签:val iat start 序列 ora art declare 批量创建 oop
----批量创建sequence
declare
type v_array is varray(19) of varchar2(100);
v_index number;
v_arr v_array:=v_array(‘gen_table‘,‘gen_table_column‘,‘sys_config‘,‘sys_dept‘,‘sys_dict_data‘,‘sys_dict_type‘,‘sys_job‘,
‘sys_job_log‘,‘sys_logininfor‘,‘sys_menu‘,‘sys_notice‘,‘sys_oper_log‘,‘sys_post‘,‘sys_role‘,‘sys_role_dept‘,‘sys_role_menu‘,
‘sys_user‘,‘sys_user_post‘,‘sys_user_role‘);
v_sql varchar2(2000);
begin
for i in 1..v_arr.count loop
v_sql:=‘create sequence seq_‘||v_arr(i)
||‘ minvalue 1 start with 1 increment by 1 cache 2‘;
--dbms_output.put_line(v_sql);
execute immediate v_sql;
end loop;
end;
标签:val iat start 序列 ora art declare 批量创建 oop
原文地址:https://www.cnblogs.com/auldlangsynezh/p/12118517.html