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 return more than one value from a function?

Answer Posted / mglbayar

We can use oracle pipelined function

FUNCTION f_serie_arithmetica (p_nr IN NUMBER)
RETURN ARRAY PIPELINED
IS
v_sum NUMBER;
BEGIN
v_sum := 0;
FOR i IN 1 .. p_nr
LOOP
v_sum := v_sum + i;
PIPE ROW (v_sum);
END LOOP;
RETURN;
END;

Usage:
select * from table(f_serie_arithmetica(23));

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need unique key in a table?

882


Does truncate free space?

943


Does a primary key have to be a number?

915


explain the options of myisamchk to improve the performance of a table. : Sql dba

949


how to start mysql server? : Sql dba

1141


What is the difference between a database and a relational database?

1034


What is meant by cursor in sql?

940


Explain two easy sql optimizations.

959


Which function is used to return remainder in a division operator in sql?

1073


What is out parameter used for eventhough return statement can also be used in pl/sql?

1013


What is a nested table in word?

909


what is the stuff function and how does it differ from the replace function? : Sql dba

988


how to calculate expressions with sql statements? : Sql dba

979


How do I get sql certification?

920


Why do we need a foreign key?

1015