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 to display the current date in sql?
What are tables in sql?
What is a behavioral trigger?
Can you create a table with Primary Key not as the clustered index.
Why are cursors used?
Explain autonomous transaction.
Which data dictionary views have the information on the triggers that are available in the database?
what is the syntax for using sql_variant_property? : Transact sql
What are joins in sql?
Can we use having without group by in sql?
Can we call procedure in select statement?
Explain the structure of pl/sql in brief.