"Troubleshooting Errors in SQL Stored Procedure for Calculating Employee Bonuses"

Options
khanzain
khanzain ✭✭
edited 01/09/24 in API & Developers

"I'm working on a stored procedure that calculates employee bonuses, but there's a hiccup. Can you pinpoint the error in the code provided?


CREATE PROCEDURE CalculateSalary

  @EmployeeID INT,

  @BonusPercentage DECIMAL(5, 2) OUTPUT

AS

BEGIN

  SELECT INTO @BonusPercentage = Salary * 0.1

  FROM Employees

  WHERE EmployeeID = @EmployeeID;

END;"

Answers