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 |
How to delete all rows a table in oracle?
WHAT IS THE DIFFERENCE BETWEEN PRIMARY KEY(PK) CONSTRAINT AND UNIQUE KEY(UK) + NOT NULL(NN) CONSTRAINT ASSIGN TO A COLUMN ? INSTEAD OF ASSIGNING PK ,WE CAN ASSIGN UK + NN TO A COLUMN. WHAT ARE THE MARRITS AND DEMARITS BETWEEN THE ABOVE TWO?THE ABOVE TWO ARE SAME,THEY DON'T ALLOW DUPLICATE AS WELL AS NULL VALUES.
How to get last row id?
which statement is running fastly ie insert or delete?
types of indexes and the rationale behind choosing a particular index for a situation.
There are three tables : E : EID,ENAME D : DID,DNAME empdept : eid, did select the employees who doesn't belong to any dep
How to run create database statement?
Explain the use of log option in exp command.
What are data pump export and import modes?
23. Display the client name for all clients who have placed an order where any order line has more than 3 items. Do not use a table join anywhere in your query.
What is the data type of dual table?
Select the Nth lowest value from a table?