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

How do we accept inputs from user during runtime?

0 Answers  


how to extract a unit value from a date and time? : Sql dba

0 Answers  


What are the different types of sql commands?

0 Answers  


how can we optimize or increase the speed of a mysql select query? : Sql dba

0 Answers  


how mysql optimizes distinct? : Sql dba

0 Answers  






What is the difference between in and between in sql?

0 Answers  


What is embedded sql what are its advantages?

0 Answers  


What are inbuilt functions in sql?

0 Answers  


What is Overloading of procedures ?

2 Answers  


What are tables in sql?

0 Answers  


How can you select unique records from a table?

0 Answers  


How will you debug your procedure? If your procedure is around 2000 lines and the expected output is 10 and we get only output 5.So how will you debug it? Somebody pls give the correct answer?

2 Answers   Fidelity,


Categories