1.
Write a PL/SQL block that selects the maximum department number in the
department table and store it in a variable. And print the results to screen.
2. Create a PL/SQL block to insert a new department number into the Departments
table. Use maximum dept number fetched from above and adds 10 to it. Use SQL*PLUS
substitution variable for department name. Leave the location AS null.
3. Create a PL/SQL block to update the location for an existing department. Use
substitution variable for dept no. and dept location.
4. Create a PL/SQL Block to delete the department created in exercise 2.
Print to the screen the number of rows affected.
5. 1. Write a PL/SQL block which accepts employee name from the User at the
runtime.
It should display the following :
Employee name, PF and net salary.
HRA=31% of basic salary
DA=15% of basic salary
Net salary=basic+HRA+DA-PF
If the basic is less than 3000 PF is 5% of basic salary.
If the basic is between 3000 and 5000 PF is 7% of basic salary.
If the basic is between 5000 and 8000 PF is 8% of basic salary.