try using execute immediate 'sql statement' ;
Login to rate this answer.
balaji
Answered On : Jul 19th, 2006
yes,u can use dynamic sql statements in pl/sql.check the below code..
declare
v_empno emp.empno%type :=&empno;
v_ename emp.ename%type;
v_sal emp.sal%type;
begin
select ename,sal into v_ename,v_sal from emp where empno=v_empno;
dbms_output.put_line('name : '||v_ename||' sal is :'||v_sal);
end;
(u have to set the serveroutput environment option to on)
Login to rate this answer.
Rama Krishna,Yerra
Answered On : Aug 2nd, 2006
This is also another method..
Oracle Supports a built-in package
DBMS_SQL by this we can execure
We must use the following methods.
PARSE()
BIND()
Thanks&REgds
Ramki,TCS,Hyd
Login to rate this answer.
jitendra
Answered On : Aug 8th, 2007
You can use execute_imediate in PL/SQL.
Login to rate this answer.