How to fetch the rows by dynamicaly passing table name
through cursor?

Answers were Sorted based on User's Feedback



How to fetch the rows by dynamicaly passing table name through cursor?..

Answer / swapna

We have to use stored procedure and parameterized cursor.

Is This Answer Correct ?    2 Yes 1 No

How to fetch the rows by dynamicaly passing table name through cursor?..

Answer / vikram jayaprakash

Ref Cursor will come in handy when tables are passed
dynamically.

Is This Answer Correct ?    2 Yes 1 No

How to fetch the rows by dynamicaly passing table name through cursor?..

Answer / 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

More SQL PLSQL Interview Questions

Difference between views and materialized views?

5 Answers   BirlaSoft,


How run sql*plus commands that are stored in a local file?

0 Answers  


Define join and name different types of joins?

0 Answers  


how to give permission to users that users can update/insert/delete on a row of table on timeing 10am to 6pm only?

4 Answers   TCS,


how to enter numeric values as hex numbers? : Sql dba

0 Answers  






what is “go” in t-sql? : Transact sql

0 Answers  


What is the life of an sql statement?

0 Answers  


How to use sql statements in pl/sql?

0 Answers  


what is the difference between trigger and storedprocedures

16 Answers   Tech Mahindra,


How can you get sql*loader to commit only at the end of the load file? : aql loader

0 Answers  


IF EMP HAS 2 ROWS,DEPT HAS 4 ROWS.WHATS THE RESULT OF SELECT * FROM EMP,DEPT;

1 Answers  


How can I change database name in sql?

0 Answers  


Categories