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

What is primary key secondary key alternate key candidate key?

756


What is consistency?

882


What are the possible values that can be stored in a boolean data field?

713


What do you mean by rowid?

699


What is difference between left and right outer join?

717






How can one get sql*loader to commit only at the end of the load file? : aql loader

737


What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql

730


What is user defined functions?

739


Why schema is used in sql?

720


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

2172


How can we connect an Android App to an Oracle database and use the PL/SQL procedural code?

795


Explain the steps needed to create the scheduled job?

745


Which constraints we can use while creating database in sql?

786


how to select unique records from a table? : Sql dba

820


Can we use distinct and group by together?

779