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 'mysqladmin' in mysql? : Sql dba

1025


Is sqlite thread safe?

1049


What is recursive join in sql?

1021


what is the different between now() and current_date()? : Sql dba

1022


How does a self join work?

1125


What is the best partition size for windows 10?

1002


Is sql a programming?

972


How do I write a sql query in pgadmin 4?

983


How do you break a loop in pl sql?

1049


What are types of indexes in sql?

1082


What is union and union all keyword in sql?

1042


How do you write a complex sql query?

1078


What is dbo in sql?

962


Is primary key always clustered index?

1023


what is heap table? : Sql dba

1105