create or replace procedure show_tab_rec ( P_tab VARCHAR2 )
IS
cmd varchar2(50);
begin
cmd := 'select *
from '|| P_tab;
for int in ( execute immediate cmd )
loop
dbms_output.put_line ( int.ename||' '||int.deptno);
end loop;
end;
when i m compling this procedure i m getting this error
PLS-00103: Encountered the symbol "IMMEDIATE" when expecting
one
of the following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not
range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
SUBMULTISET_
PLZ solve this error
give this question answer asap
Thanks advance.......
Answer Posted / satish
we can't use execute immediate in for loop cursor.So,we can
use ref cursor instead of this to achieve this solution
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain mutating triggers.
What is define in oracle?
Please explain oracle left join with an example?
What is the difference between primary key and unique key and foreign key in oracle?
 What are the oracle DML commands possible through an update strategy?
How to create additional tablespaces for an new database?
Why is oracle database so popular?
Can we save images in a database and if yes, how?
Explain the use of record length option in exp command.
how do u setup a replication site?
Can group functions be used in the order by clause in oracle?
Using the relations and the rules set out in the notes under each relation, write table create statements for the relations EMPLOYEE, FIRE and DESPATCH. You should aim to provide each constraint with a formal name, for example table_column_pk.
What is an oracle table?
What is a sub query? What are its various types?
How to use "if" statements on multiple conditions?