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

what are the different type of normalization? : Sql dba

1022


What is sql entity?

1086


What is java sql connection?

1036


How to take user input in pl sql?

1153


What is minus?

981


Can triggers stop a dml statement from executing on a table?

1078


What does the file extension accdb stand for?

965


What is scope and visibility in PL/SQL?

1188


Can we use delete in merge statement?

1033


What is meant by truncate in sql?

1054


what is a scheduled jobs or what is a scheduled tasks? : Sql dba

954


Why sql query is slow?

978


explain about mysql and its features. : Sql dba

1008


What is numeric function sql?

1049


What is the largest value that can be stored in a byte data field?

1008