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 will you distinguish a global variable with a local variable in pl/sql?
Can a foreign key be a duplicate?
What are the different ddl commands in sql?
When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?
What is the size of partition table?
how to rename an existing column in a table? : Sql dba
Explain cursor types?
Which one is better sql or oracle?
Is oracle sql free?
What is multiple columns?
how to use like conditions? : Sql dba
What is left inner join in sql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)