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 use of oracle?
Is primary key indexed by default in oracle?
Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?
What do you mean by cdb and pdb in oracle 12c?
Is there a combination of "like" and "in" in sql?
how to retrieve 1st and last row of table without using group functions??
How does one get the view definition of fixed views/tables?
What is transport network substrate (tns) in oracle?
i have a table with the columns below as Emp_ID Address_ID Address_Line City Country -------- --------- ----------- ------ --------- Q: Display the Emp_ID's those having more than one Address_ID
what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?
What happens if you use a wrong connect identifier?
Define the terms primary key foreign key and also the difference between primary and the unique key