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
how to drop an existing view in mysql? : Sql dba
what is the difference between inner and outer join? Explain with example. : Sql dba
what is schema? : Sql dba
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
Which normal form is best?
what is try_catch block in procedure
how to enter binary numbers in sql statements? : Sql dba
How is sql used in oracle?
What is a column in a table?
Explain what is an index?
What is a procedure in pl sql?
what is not null constraint? : Sql dba
How do you update f as m and m as f from the below table testtable?
Enlist the advantages of sql.
How do I create a sql database?