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 many columns can be used for creating index? : Sql dba
Is sql an operating system?
Why do we need sharding?
How insert into statements in sql?
How do I count duplicates in sql?
What are the types of subqueries?
Explain the difference in execution of triggers and stored procedures?
Explain select statements in sql?
what is a cursor? : Sql dba
How many types of indexes are there in sql?
what is 'mysqldump'? : Sql dba
What is the difference between function and procedure in pl/sql?
What is a schema sql?
What are the ways on commenting in a pl/sql code?
what is a control file ? : Sql dba