begin
declare
v_sql varchar(500);
v_ccc varchar(100);
begin
v_ccc := 'cc'||'c';
dbms_output.put_line( '--------cc--------' || v_ccc);
v_sql := 'INSERT INTO aaa (a) select '|| v_ccc || ' from bbb ';
dbms_output.put_line( '--------v_sql--------' || v_sql);
execute immediate v_sql;
end;
end;
CREATE TABLE aaa(a VARCHAR(100) )
CREATE TABLE bbb(ccc VARCHAR(100) )
INSERT INTO bbb (ccc) select '55555' from dual;
select * from aaa
select * from bbb
delete from aaa