How to return more than one value from a function?
Answer Posted / murali
We can return more than one row using out parameter. Try
this with the following.
create or replace function my_func(myno number, myname out
varchar2) return number as
mysal emp.sal%type;
begin
select ename, sal into myname, mysal from emp where
empno=myno;
return sal;
end;
in the above example we are returning first value mysal
using return statement and second value myname using out
parameter.
Is This Answer Correct ? | 11 Yes | 18 No |
Post New Answer View All Answers
Mention what does the hierarchical profiler does?
What is a scalar value in sql?
What is the advantage of index in sql?
what are the different index configurations a table can have? : Sql dba
Explain the uses of control file.
What is the maximum rows in csv?
What does where 1/2 mean in sql?
Define union, minus, union all, intersect ?
what is 'mysqladmin' in mysql? : Sql dba
How do I make my sql query run faster?
What is bulk collect in pl sql?
can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba
State few characteristics of pl/sql?
What is the use of index in sql?
Explain correlated query work?