as far as I understood it, it is only possible to have OUT or IN OUT parameters for procedures, not functions. However, when defining a user-defined aggregate function, I have found this signature:
member FUNCTION ODCIAggregateIterate(self IN OUT DeviationImpl,
value IN NUMBER) RETURN NUMBER
This seems to be a function, however, it has an IN OUT parameter. Could somebody explain me why is this possible?
Thanks
There is no such restrictions. Functions can have OUT or IN OUT parameters.
However, Oracle recommends against using them.
OUT and IN OUT parameters prevent a function from being used from plain SQL, marked as a DETERMINISTIC function or used as a result-cached function. So these type of parameters are mainly a problem if you want to use the function in a SQL query.
Your example is even more specific: it's a member function, not a global function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With