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 is clause in sql?

1176


what are the performance and scalability characteristics of mysql? : Sql dba

1032


how to create a new table by selecting rows from another table in mysql? : Sql dba

1164


What is mutating trigger?

1071


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

1107


What are different categories of sql commands?

1192


What is the difference between microsoft access and sql?

1073


What is sql in java?

1134


How do you update a value in sql?

1100


Does sql backup shrink transaction log?

1042


explain mysql aggregate functions. : Sql dba

1028


Can we use view in stored procedure?

953


Is stored procedure faster than query?

1018


What is the difference between subquery and correlated query?

1112


Which table is left in join?

1016