[B]Question asked by visitor lalitendu bag[/b]
Can Functions Return more than 1 value? if yes then give an example.
Printable View
[B]Question asked by visitor lalitendu bag[/b]
Can Functions Return more than 1 value? if yes then give an example.
Using the RETURN clause, function can return only one variable. The variable can be of any data type - Number, VARCHAR, REF CURSOR, PL/SQL Table and many more. If the function is returning a data structure like PL/SQL Table, REF CURSOR etc, it is returning more than one value.
Another way of returning values is using OUT parameters. And this applies to both Procedures and Functions. Using OUT parameters, you can return as many values as you need.
If you have a need for OUT parameters, though, you would generally want a procedure, not a function. A function with OUT parameters cannot be called from a SQL statement, which rather defeats the purpose of using a function.
Function can able to return more than one value using ref cursur...
but that is not recomended.
yes it can return....
1=true
0=false
-1=any crash