PLSQL: PACKAGES
32 programming challenges to help you master the fundamentals of DATABASE MANAGEMENT SYSTEM USING ORACLE.
Write a package specification and body to display "Hello Oracle".
(Package Basic Structure)
Create a package containing a function to return square of a number.
(Package + Function)
Create a package that uses a variable to count number of procedure calls.
(Package State Management)
Write a package with a global variable used in multiple procedures.
(Shared Variable in Package)
Create a package procedure to increase salary of all employees by 10%.
(Package + Business Logic)
Create a package function to calculate bonus (10% of salary).
(Package Function + Logic)
Create a package with parameterized cursor to fetch employees by department.
(Package + Parameterized Cursor)
Create a package procedure that loops through employees using cursor FOR LOOP.
(Package + Cursor Loop)
Create a package with private procedure (only in body, not in specification).
(Private vs Public in Package)
Create a package with overloaded procedures (same name, different parameters).
(Procedure Overloading)
Create a package that calculates salary, bonus, and tax using multiple functions.
(Business Logic Package)
Create a package that interacts with multiple tables (EMP, DEPT).
(Multi-table Package)
Create a package that uses exception handling for all operations.
(Exception Handling in Package)