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
Is primary key a clustered index?
What are the types of join in sql?
What is the need of merge statement?
What are types of joins?
Is keyword pl sql?
Why sql query is slow?
What is percent sign in sql?
What is cursor explain with example?
How many types of cursors are available in pl/sql?
Why is theta join required?
What does closing a cursor do?
Is full outer join same as cross join?
What are sql commands?
what does it mean to have quoted_identifier on? : Sql dba
What is the difference between left and left outer join?