Suppose I have a PL / SQL stored procedure as follows:
PROCEDURE do_something(foo VARCHAR2 DEFAULT NULL) IS
BEGIN
END;
Now suppose that do_somethingis called in two different ways:
do_something();
do_something(foo => NULL)
How to define a procedure do_somethingto determine which scenario calls it?
Edit: Refining my intentions for this procedure:
FUNCTION find_customer(name VARCHAR2 DEFAULT NULL, number VARCHAR2 DEFAULT NULL) RETURN NUMBER IS
BEGIN
END;
The following are examples of how to use this procedure with the necessary SQL statements:
find_customer(name => 'Sam')
find_customer(name => 'Sam', number => '1588Z')
find_customer(name => 'Sam', number => NULL)
find_customer(name => NULL)
find_customer(name => NULL, number => NULL)
source
share