create or replace procedure AddTable
as
i number(4);
t_name varchar2(100);
begin
i := 1;
while i <= 3 loop
t_name := 'dept'||(i*10);
exec immediate 'create table '||t_name||' as select * from dept where 1=2';
i := i+1;
dbms_output.put_line(t_name);
end loop;
end;
------解决方案--------------------
execute immediate?