PLSQL WORKSHEET

Reviews
Shared by: parpar
Stats
views:
31
rating:
not rated
reviews:
0
posted:
11/26/2008
language:
English
pages:
0
PL/SQL WORKSHEET 1. Input a salary, output all the employees that have salary greater than the input salary. 2. Input two salaries, output all the employees that has a salary within the input range. 3. Input two employee numbers, delete all the employees within the two employee numbers. 4. Input an employee name, add 500 to the employees commission. 5. Create a table called EMP5 based on the employee table with the following fields: ename, hiredate, sal and comm. 6. Input a salary, add all the employees that have a salary greater than the salary input to the EMP5 table. 7. Suppose that the EMP table contains an odd number of employees. Input an odd number N from the keyboard. Output the middle N employees in the EMP table, sorted by salary. Problems set by Manashe 8. Create a table called managers with 2 fields: mgrnum and position. Fill the table by selecting all the employees from the emp table who are managers. The manager number will correspond to the empno in the emp table, the position reflects the job the manager does i.e. If an emloyee is in the sales department and s/he is a manager then the persons position is Sales manager. 9. Write using a cursor to retrieve rows from the emp table who are managers. Use the same cursor to fill the managers table. Output the number of rows in the managers table. 10. Alter the managers table by adding a field called payment which reflects the total amount that the department is paying to their employees. Fill the fields by extracting and summing up the salaries from the emp table; group the salaried by department. Remember the total amount paid by the department includes the commission amount. Problems set by Prince 11. Write a script to input an employee number and output the employee name, job, loc and of the employee salary is greater than the average salary. 12. Write a script to output all employees whose name start with the letter ā€˜S’ and if they have a salary between the highest salary and (the highest salary – 15%). 13. Write a script to input the employee number and update the employees salary as follows: Increase by 5% if salary is less than 1000 Increase by 10% if the salary is >= 1000 and <= 2500 Increase by 15% if the salary is > 2500 Output the amount increase Problems by Dumasani 14. Write a script to output all the employees that are earning more than their managers eg Blake. 15. Write a script to find and output all the top earners in each department. If there is more than one employee that has the top salary in the department the program should output all.

Related docs
plsql run from sql
Views: 0  |  Downloads: 0
PLSQL
Views: 12  |  Downloads: 4
PlSql
Views: 35  |  Downloads: 5
How to unwrap PLSQL
Views: 24  |  Downloads: 1
SQL Notes
Views: 125  |  Downloads: 59
Oracle SQL and PLSQL Bad Practice
Views: 8708  |  Downloads: 334
OR102 - PLSQL and Database Objects
Views: 13  |  Downloads: 0
PLSQL_BestPractices
Views: 46  |  Downloads: 6
Connecting to the Database via PLSQL, JDBC
Views: 73  |  Downloads: 14
Overview of PLSQL
Views: 0  |  Downloads: 0
sleep in plsql
Views: 48  |  Downloads: 3
Oracle_PLSQL
Views: 20  |  Downloads: 6
Oracle Database 11g Advanced PL/SQL
Views: 1634  |  Downloads: 171
Other docs by parpar
Sample Executive Summary JH Reid
Views: 279  |  Downloads: 3
Commercial Sublease
Views: 737  |  Downloads: 78
Break Even Analysis for Investment Property
Views: 472  |  Downloads: 47
Transcript of Chinese Exclusion Act
Views: 162  |  Downloads: 0
Signature page for limited partner
Views: 242  |  Downloads: 2
Assignment of application for registration
Views: 172  |  Downloads: 0
pressreleasesample
Views: 273  |  Downloads: 4
Scrap iron and metal business
Views: 320  |  Downloads: 6
Sample Executive Summary SellingPros
Views: 229  |  Downloads: 3
Dispute Resolution Clause
Views: 379  |  Downloads: 2
4mega
Views: 123  |  Downloads: 0
103_3-day_Notice_To_Pay_Rent_Or_Move_Out
Views: 273  |  Downloads: 8