Skip to content

STORED

DELIMITER //
CREATE PROCEDURE SalaryIncrease(IN emp_id INT)
BEGIN
UPDATE employees
SET salary = salary * 1.10
WHERE employee_id = emp_id;
END //
DELIMITER ;
Query OK, 0 rows affected (0.00 sec)

The above code defines a STORED PROCEDURE in MySQL. The procedure, named ‘SalaryIncrease’, takes one parameter ‘emp_id’ of type INT. When invoked, it increases the salary of the employee with the specified id by 10%.