I want to update my current row not all rows. I'm doing this. Can I set the value of update set using a variable? I am doing wrong procedure. please help.
CREATE TRIGGER changeActive
ON offer_plans
AFTER UPDATE AS
BEGIN
DECLARE @a INT;
UPDATE offer_plans SET is_active = @a //Here I want to update the current updating row.
CASE
WHEN is_active = 0 THEN @a = 1
WHEN is_active = 1 THEN @a = 0
END
END
GO