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 are the uses of merge?
Which is faster subquery or join?
What is view? Can we update view
how tsql statements can be written and submitted to the database engine? : Transact sql
What is nvarchar max in sql?
What is coalesce sql?
Mention what plvcmt and plvrb does in pl/sql?
How do we accept inputs from user during runtime?
What is rename command in sql?
Can I create table without primary key?
What does where 1 1 mean in sql?
how many tables will create when we create table, what are they? : Sql dba
what is a foreign key ? : Sql dba
Does view contain data?
How do you know if a relationship is 2nf?