EXECUTE IMMEDIATE
Posted
by
user578332
on Stack Overflow
See other posts from Stack Overflow
or by user578332
Published on 2011-01-17T09:39:04Z
Indexed on
2011/01/17
9:53 UTC
Read the original article
Hit count: 154
oracle10g
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.
© Stack Overflow or respective owner