Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to fetch the rows by dynamicaly passing table name
through cursor?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do rank () and dense_rank () differ?

974


How do sql databases work?

944


Explain what is rdbms?

991


What are the different types of a subquery?

981


What is fmtonly in sql?

1008


What is a composite primary key?

1030


Can you select everything, but 1 or 2 fields, without writer's cramp?

931


How is a process of pl/sql compiled?

1083


What is inner join in sql?

1001


What are % type and % rowtype?

979


What are the basic techniques of indexing?

1012


Is id a reserved word in sql?

1091


How can I make sql query run faster?

960


What is the use of function in sql?

1027


Is vs as in pl sql?

933