create or replace procedure pro_insert_code(start_code in varchar2,
end_code in varchar2) is
v_dwmc varchar2(50) := '云南';
v_dwdm varchar2(50) := '35';
v_length number;
v_start number;
v_end number;
begin
select length(start_code) into v_length from dual;
v_start := to_number(start_code);
v_end := to_number(end_code);
for v_start in to_number(start_code) .. v_end loop
insert into a
(dwdm, dwmc, fph)
values
(v_dwdm, v_dwmc, lpad(v_start, v_length, '0'));
end loop;
end;