EXECUTE IMMEDIATE
- by user578332
Hi.
I want to create table like this:
create table ttt
(
col1 varchar2(2),
col2 varchar2(2),
col3 varchar2(2),
col4 varchar2(2),
col5 varchar2(2)
);
with this procedure, but it does not work. May you help me?
declare
str varchar2(200);
i int;
begin
for i in 1 .. 5 loop
begin
str:=’str’||i||”;
end;
end loop;
execute immediate ‘create table t1 (“str” varchar2(2) )’;
end;
/
Thanks in advance.