Referencing a package v16

To reference the types, items, and subprograms that are declared in a package specification, use the dot notation. For example:

package_name.type_name

package_name.item_name

package_name.subprogram_name

To invoke a function from the emp_admin package specification, execute the following SQL command:

SELECT emp_admin.get_dept_name(10) FROM DUAL;

This example invokes the get_dept_name function declared in the package emp_admin. It passes the department number as an argument to the function, which returns the name of the department. The value returned is ACCOUNTING, which corresponds to department number 10.