Write SQL code for the following: Create a stored procedure “setRelocationFee” to set the relocation fee for a given employee. If the employee’s office is in San Francisco, the relocation fee is $10000; if the employee’s office is in Boston, the relocation fee is $8000; if the employee’s office is in London, the relocation fee is $20000; if the employee works in other offices, the relocation fee is $15000.
Write SQL code for the following:
Create a stored procedure “setRelocationFee” to set the relocation fee for a given
employee. If the employee’s office is in San Francisco, the relocation fee is $10000; if
the employee’s office is in Boston, the relocation fee is $8000; if the employee’s office
is in London, the relocation fee is $20000; if the employee works in other offices, the
relocation fee is $15000.
(see image for table structure)
I am stuck for the part that I have to select employeeNumber and officeCode and set the relocationFee to be able to obtain the result but I do not know how. Bellow is what I have gotten.
Delimiter|
CREATE PROCEDURE setRealocationFee(IN EmployeeID INT(11), OUT realocationFee INT(5))


Trending now
This is a popular solution!
Step by step
Solved in 2 steps









