create or replace procedure create_tablespace
i int
as
begin
i:=1;
loop
create tablespace (这里应该怎么写?怎么和i连起来呢?)
datafile '/var/oracle/oradata/db0/lee_t_personaldownreport_p44.dat'
size 1500m autoextend on
default storage (initial 1000m next 50m minextents 1 maxextents unlimited pctincrease
i:=i+1;
if i>5 then
exit
end if
end loop
end
------解决方案-------------------- 'tablespace'||i
------解决方案-------------------- 使用动态sql: for i in 1..5 loop v_sql:='create tablespace tablespace'||i||' ......... datafile=/oracledata/data'||i||'.dbf ..... ; execute immmediate v_sql; end loop;