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 |
why can't we assign not null constraint as table level constraint
What is a deadlock ? Explain .
write a query to count number of alphabets in given string for example "APPLE" write a query to generate sequence from 50 to 100 write a query to display in single string "ABCD,EFGH,IJKL,PQRS"
How do I connect to oracle database?
What is a procedure in oracle?
Database crashes. Corruption is found scattered among the file system neither of your doing nor of Oracles. What database recovery options are available? Database is in archive log mode.
What is an anonymous block?
What is the difference between an Oracle Schema and an Oracle Instance?
How to create tables for odbc connection testing?
How to use subqueries with the in operator using oracle?
How to define a sub function?
can anyone help me ? an index has been done on the primary key of a table. an update operation was performed on that table. now my question is 1> what abt the performance ? means faster or slower due to indexing ? 2> does the operation affect to the primary key constraint ?