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 / 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 |
Which database is better for os platform dependency?
How do we represent comments in oracle?
what is the syntax of UPDATE command?
What is a sub query and what are the different types of subqueries?
What is columnar storage what is the advantage?
What operating systems are supported by oracle database 10g xe?
Why do we need integrity constraints in a database?
What is a public synonym?
what is primary key?
In which dictionary table or view would you look to determine at which time a snapshot or MVIEW last successfully refreshed?
Can you drop an index associated with a unique or primary key constraint?
How would you go about verifying the network name that the local_listener is currently using?