PL/SQL Package - Mathematical Exercises and Database Manipulation
PL/SQL Package [ 17 exercises with solution ]
1. Write a PL/SQL code to create a package that includes a procedure to calculate the factorial of a number and a function to check if a number is prime.
2. Write a PL/SQL code to develop a package that includes procedures and functions to perform various string manipulations, such as reversing a string and counting the occurrence of a substring.
3. Write a package that includes a procedure to validate user input for a specific data type and handle any exceptions that may occur.
4. Write a PL/SQL code that implement a package that includes procedures and functions to perform complex mathematical operations, such as finding the nth root of a number and calculating logarithms.
5. Write a PL/SQL code to create a package that includes a procedure to generate a random password and a function to check the password strength based on certain criteria.
6. Write a PL/SQL package that includes procedures and functions to handle date and time operations, such as calculating the difference between two dates and converting between different date formats.
7. Write a PL/SQL package that contains a procedure to calculate the average salary of employees in a specific department.
8. Write a PL/SQL package that contains a function to retrieve the total number of employees in a specific job title.
9. Write a PL/SQL package that contains a procedure to update the salary of an employee based on their performance rating.
10. Write a PL/SQL package that contains a function to calculate the bonus amount for employees based on their salary and years of service.
11. Write a PL/SQL package that contains a function to retrieve the top N employees with the highest salaries.
12. Write a PL/SQL code that create a package that contains a function to calculate the total salary cost for a specific department and its sub-departments.
13. Write a code in PL/SQL that create a package that contains a function to retrieve the average age of employees in a given department..
14. Write a PL/SQL code that create a package that contains a function to retrieve the names of employees who have the same manager.
15. Write a code in PL/SQL that create a package that contains a function to retrieve the highest paid employee in each department.
16. Write a code in PL/SQL that create a package that contains a function to calculate the average tenure of employees in a specific job category.
17. Write a code in PL/SQL which create a package that contains a function to retrieve the names of employees who have the same job title and manager.
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/plsql-exercises/package/index.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics