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
What is pl sql variable?
What can I use instead of union in sql?
How to process query result in pl/sql?
How to convert comma separated string to array in pl/sql?
What is gpt format?
How do you change a value in sql?
Is hadoop a nosql?
what is the use of set statement in tsql? : Transact sql
Where do we use pl sql?
What is the difference between sql and isql*plus?
Why do we use subquery?
How does a covering index work?
What happens when a trigger is associated to a view?
What is the difference between mdf and ndf files?
What is rownum in sql?