Home » SQL & PL/SQL » SQL & PL/SQL » Why use OUT parameters??
Why use OUT parameters?? [message #38789] Wed, 15 May 2002 06:09 Go to next message
Mohammad Syed
Messages: 18
Registered: November 2000
Junior Member
Lets say I do not want to return values to the user via a procedure. Is there any use of an OUT parameter that can not be accomplished through a declared variable? Just wanted to be 100% sure.
Re: Why use OUT parameters?? [message #38790 is a reply to message #38789] Wed, 15 May 2002 06:35 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
A function can return only one "return value" even though that could be something like a pl/sql table. Using OUT parameters you can return multiple parameters (functions can also use OUT parameters). Some non-oracle interfaces (JDBC, VB etc) have limitations on what combinations are suppirted, so best check. The choice of functions vs procedures is often just a choice of style.

If you wanted to write some code to set a value and another to retrieve the value, you would typically write set_value() as a procedure and get_value() as a function.

IN, OUT, IN/OUT are supported. NOCOPY hint is also available.
Re: Why use OUT parameters?? [message #38797 is a reply to message #38789] Wed, 15 May 2002 10:41 Go to previous message
Mohammad Syed
Messages: 18
Registered: November 2000
Junior Member
Thanks for the tip!! Actually though, I was asking that if you DID NOT want to display anything for a procedure or function, what could the OUT parameters offer that would be advantageous over creating a local variable??
Previous Topic: format mask
Next Topic: query aces?
Goto Forum:
  


Current Time: Fri Apr 26 19:17:47 CDT 2024