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 |
what is trigger?
What is the difference between view and materialized view in Oracle?
What is meant by joins? List out the types of joins.
How to get execution path reports on query statements?
In what script is snap$ created? In what script is the scott/tiger schema created?
Explain the characteristics of oracle dba?
If server is in US and client is in india there is timezone is diffrence, How can we display date in indian time when data is displayed from US server timezone?
query to find the maximum no persons with same age(age colomn) from emp table
What are the roles of dba?
i can't insert column value greater than 4000 characters at one instance even i am using CLOB datatype . how to insert efficiently more than 4000 characters ? And please let me know how to impose inline and out-of line constraints on oracle column??? Thanks in Advance... Prakash
How to create a new view in oracle?
Find all employees in Dept “Marketing”.