How to return more than one value from a function?

Answer Posted / alok sinha

Hello Boyz !!

Get excited to see this example thru

declare
--
varx1 number := 0;
varx2 number := 0;
varx3 number := 3;
--
begin
--
--
dbms_output.put_line('In: Varx #1 : initial value :: ' ||
varx1);
dbms_output.put_line('In: Varx #2 : initial value :: ' ||
varx2);
--
dbms_output.put_line('In: Varx #3 : Initial value :: ' ||
varx3);
dbms_output.put_line('

');
dbms_output.put_line('Hhhmmmnnn
Hhhmmmnnn Hhhmmmnnn ');
dbms_output.put_line('

');
--
--
varx3 := xx_func(varx3, varx1, varx2);
--
--
dbms_output.put_line('------------------------------------
--------------');
dbms_output.put_line('---------- Post Function -----------
------');
dbms_output.put_line('------------------------------------
--------------');
dbms_output.put_line('

');
dbms_output.put_line('------------------------------------
--------------');
dbms_output.put_line('Return Value :: Varx #3 :: returned
from function :: '|| varx3);
dbms_output.put_line('Out: Varx #1 : returned from
function :: '|| varx1);
dbms_output.put_line('Out: Varx #2 : returned from
function :: '|| varx2);
--
end;


create or replace function xx_func(north in number, east in
out number, west in out number ) return number is
south number;
begin
south := north + 4;
east := 4;
west := 5;
--
return south;
end xx_func;

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain locks? : Transact sql

569


What are the popular database management systems in the it industry?

561


How do I pipe the output of one isql to another?

530


Explain the working of foreign key?

542


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

2003






How do you declare a user-defined exception?

528


What is crud sql?

538


How to find 3rd highest salary of an employee from the employee table in sql?

565


how to include comments in sql statements? : Sql dba

541


How to get list of all tables from a database?

623


what is the difference between nested subquery and correlated subquery?

547


Are stored procedures compiled?

522


What is database migration?

517


What sql database should I use?

547


Is sql difficult?

743