How to fetch the rows by dynamicaly passing table name
through cursor?
Answer Posted / madhav
By using ref cursor along with reocord data type(with out
using record type we can't pass the table name dynamically)
cursor refcursor is ref cursor;---weak ref cursor
v_refcursor refcursor----cursor variable
type recordtye is record(table_record table%rowtye,.....)
begin
if not v_recordtype%isopen then
open v_recordtype for select * from emp
end if;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do I view a view in sql?
What are the main features of cursor?
What steps server process has to take to execute an update statement?
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
How does postgresql compare to "nosql"?
What does trigger mean in psychology?
Is sql better than excel?
Explain raise_application_error.
What is anonymous block in sql?
explain the delete statements in sql
What is difference between group by and partition by?
What is sql rowcount?
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
What is the difference between union and union all command?
how to load data files into tables with 'mysqlimport'? : Sql dba