Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
05-24-2006, 07:34 PM #1
- Join Date
- Oct 2004
- Thanked 0 Times in 0 Posts
Triggers and Log Files (SQL Server)
I have this trigger that occurs whenever a row is updated.
My question is, if the raiserror is reached, does it post to a log file?
Thanks in advance!
CREATE TRIGGER res_Update ON Resort FOR UPDATE AS DECLARE @RNstars int, @RNstars2 int SELECT @RNstars = inserted.resNumStars, @RNstars2 = deleted.resNumStars FROM Inserted, Deleted WHERE deleted.resID = inserted.resID If @RNstars < @RNstars2 BEGIN RAISERROR(‘unable to reduce rating’,16,1) ROLLBACK TRANSACTION END