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 |
What are the different ways to optimize a sql query?
What are inner and outer joins examples of both?
what is an associative array with example?
What is normalisation in sql?
Is sql a backend?
if table named a is there and 4 records are there then how to swap (1 and 3) and (2 and 4) records at a time
What are the advantages of pl sql over sql?
What is parameter substitution in sql?
How many clustered indexes can you have?
Which join is default?
how to find the First and Last Observation from the table: Ex: OBS Name Sal Ans like: OBS Name Sal 105 E 5000--> 105 E 5000 102 B 2000 104 D 4000 103 C 3000 101 A 1000--> 104 D 4000
What is substitution variable?
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)