-
Can Functions Return more than 1 value
Question asked by visitor lalitendu bag
Can Functions Return more than 1 value? if yes then give an example.
-
Re: Can Functions Return more than 1 value
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.
-
Expert Member
Re: Can Functions Return more than 1 value
yes it can return....
1=true
0=false
-1=any crash
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules