Mysql Procedure and Function Assignmnet
Mysql Procedure and Function Assignmnet
1)Create a procedure for adding a row in emp table. Display number of rows added.
Handle corresponding exception
2)Create a procedure which takes employee number as parameter and delete the
employee record. Procedure must return the empname whose record has be deleted.
3)Create a procedure which takes department name as paramater and displays all the
employee records, no of employee in that department.
- emp_bonus(empno,ename,annual_salary,bonus)
8)Write a procedure to create a cursor displays the name and salary of each
employee in the EMPLOYEES table whose salary is less than that specified by a
passed-in parameter value.
9)Write a procedure to display employee id, name, hire date, and the incentive
amount they achieved according to their working experiences,
10)Write procedure to display the department with more than five employees.
stored functions
2)Write function to return the department no having more than five employees
3)write a function to return the employee who is earning second max salary from a
perticular department.
4)write a function to return the employee who is having maximum experience from the
emp table.