How to fetch the rows by dynamicaly passing table name
through cursor?
Answers were Sorted based on User's Feedback
Answer / swapna
We have to use stored procedure and parameterized cursor.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / vikram jayaprakash
Ref Cursor will come in handy when tables are passed
dynamically.
Is This Answer Correct ? | 2 Yes | 1 No |
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 |
How do we accept inputs from user during runtime?
how to extract a unit value from a date and time? : Sql dba
What are the different types of sql commands?
how can we optimize or increase the speed of a mysql select query? : Sql dba
how mysql optimizes distinct? : Sql dba
What is the difference between in and between in sql?
What is embedded sql what are its advantages?
What are inbuilt functions in sql?
What is Overloading of procedures ?
What are tables in sql?
How can you select unique records from a table?
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?