Try the below approach.
Here first we retrieve the employee record that will be updated in Employee table and insert it into the backup table. Then the employee record in Employee table is updated. Here the stored procedure is only updating the employee name and email address. You can update any other Employee fields you want in your stored procedure.
CREATE PROCEDURE usp_UpdateEmployee
@EmployeeID INT,
@EmployeeName VARCHAR(50),
@Email VARCHAR(50)
AS
BEGIN
BEGIN TRY
BEGIN TRANSACTION
--Retreive the employee that will be updated in employee table and insert into backup table
INSERT INTO [BackUp]
(
EmployeeID,
EmployeeName,
Email
)
SELECT EmployeeID,EmployeeName, Email FROM Employee WHERE EmployeeID = @EmployeeID
--Update the data in employee table for the given EmployeeID
UPDATE Employee
SET EmployeeName = @EmployeeName
Email = @Email
WHERE EmployeeID = @EmployeeID
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
RAISERROR(ERROR_MESSAGE(),
ERROR_SEVERITY(),
1,
ERROR_NUMBER(),
ERROR_SEVERITY(),
ERROR_STATE(),
ERROR_PROCEDURE(),
ERROR_LINE()
)
END CATCH
END