Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    6

    Unanswered: returning 2 values in a function with out parameter

    HI friends,
    Can anyone give me a simple example, wherein u can return 2 values in a function using out parameter. Help!!!!!!!!!!!
    Thanks,
    Avinash

  2. #2
    Join Date
    Jun 2002
    Location
    Indianapolis
    Posts
    21
    create or replace procedure foo(num1 in number, num2 out number, num3 out number) is
    begin
    num2:=num1+num1;
    num3:=num1*num1;
    end;
    /

    declare
    var1 number;
    var2 number;
    var3 number;
    begin
    var1:=5;
    foo(var1,var2,var3);
    dbms_output.put_line('var1=' || var1);
    dbms_output.put_line('var2=' || var2);
    dbms_output.put_line('var3=' || var3);
    end;
    /

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •