Can anybody explain me briefly what is the Overloading in PL/SQL and please let me know if any restrictions of this in Oracle. Thank you.
asked Jan 07 '10 at 10:48 AM in Default
Overloading of Procedures is discussed here:
Briefly, it's a way of assigning two different kinds of operation to a single procedure name, depending on the type or number of values passed. You could create a procedure, PLUS, that had two different implementations, depending on what was passed. PLUS can be a reasonable operation for both strings and numbers but would probably work in two different ways...
PLUS (1, 1) yields 2, an arithmetic addition.
PLUS ('1','1') yields '11', a concatenation.
The restrictions are discussed on that page and there's a good example or two.
answered Jan 10 '10 at 11:24 PM
You can find a great example in DBMS_OUTPUT. You'll see an overloaded procedure called 'GET_LINES'. I think the only restriction is that each overloaded object must have a unique set of input params.
answered Jan 07 '10 at 11:03 AM