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 I view a view in sql?

936


What are the main features of cursor?

1066


What steps server process has to take to execute an update statement?

963


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

2484


How does postgresql compare to "nosql"?

1018


What does trigger mean in psychology?

947


Is sql better than excel?

1118


Explain raise_application_error.

1077


What is anonymous block in sql?

1107


explain the delete statements in sql

1028


What is difference between group by and partition by?

1040


What is sql rowcount?

987


How to fetch values from testtable1 that are not in testtable2 without using not keyword?

1199


What is the difference between union and union all command?

1061


how to load data files into tables with 'mysqlimport'? : Sql dba

1078