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 |
Difference between views and materialized views?
How run sql*plus commands that are stored in a local file?
Define join and name different types of joins?
how to give permission to users that users can update/insert/delete on a row of table on timeing 10am to 6pm only?
how to enter numeric values as hex numbers? : Sql dba
what is “go” in t-sql? : Transact sql
What is the life of an sql statement?
How to use sql statements in pl/sql?
what is the difference between trigger and storedprocedures
How can you get sql*loader to commit only at the end of the load file? : aql loader
IF EMP HAS 2 ROWS,DEPT HAS 4 ROWS.WHATS THE RESULT OF SELECT * FROM EMP,DEPT;
How can I change database name in sql?