Results 1 to 4 of 4

Thread: Pl/sql

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    1

    Wink Pl/sql

    can we have more than one RETURN statement in a function in PL/SQL ??
    I know that we can have two RETURN statements in the following format:
    if(condition) then
    return .. ;
    else
    return.. ;
    end if;
    but that is not the actual answer. Please help.


  2. #2
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Re: Pl/sql

    Fuction returns only one value. To return amount of data at a time use
    oracle pipelined functions


  3. #3
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Re: Pl/sql

    Quote Originally Posted by pritz.jobs View Post
    can we have more than one RETURN statement in a function in PL/SQL ??
    I know that we can have two RETURN statements in the following format:
    if(condition) then
    return .. ;
    else
    return.. ;
    end if;
    but that is not the actual answer. Please help.
    You may write any number of return statements in a function but depending upon the codition it returns only one value. The RETURN statement immediately completes the execution of a subprogram and returns control to the caller.


  4. #4
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Pl/sql

    You can specify as many number of return statements , but only one out of those will execute depending on the condition.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact