oracle表通过存储方式for循环创建N列
oracle表通过存储方式for循环创建N列
oracle表名,列名最大长度都为30字节
create or replace procedure addrows is
vsql VARCHAR2(100);
begin
for i in 10 ..56 loop
vsql := 'ALTER TABLE zmltest_1234567890123456789012 ADD colname_1234567890123456789b'||i||' varchar(50)';
execute immediate vsql;
end loop;
end addrows;
set serveroutput on
exec addrows