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 rank () and dense_rank () differ?
How do sql databases work?
Explain what is rdbms?
What are the different types of a subquery?
What is fmtonly in sql?
What is a composite primary key?
Can you select everything, but 1 or 2 fields, without writer's cramp?
How is a process of pl/sql compiled?
What is inner join in sql?
What are % type and % rowtype?
What are the basic techniques of indexing?
Is id a reserved word in sql?
How can I make sql query run faster?
What is the use of function in sql?
Is vs as in pl sql?