Reason for ddl command in code..!
761387May 26 2010 — edited May 26 2010Hi all,
many times 1 question is asked to me in interviews,
why we can not use create table command in plsql code without "execute immediate stmnt" in below code.
------------------------------------------------------------------------------------------------------
create procedure p1
as
begin
execute immediate 'create table pctab as select * from emp' ;
execute immediate 'trunccate table pctab' ;
update emp
set sal=100 ;
commit ;
end p1;
----------------------------------------------------------------------------------------------------------------------------------------
kindly ans....why we can not use create table command in plsql code without "execute immediate stmnt" in below code.
regards,
PC