Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Do a Trigger
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00756415
Message ID:
00756663
Views:
10
That correct. The trigger is fired after the DML has been applied to the table. One important note - the trigger is fired once no matter how many rows are affected by the DML. That can be zero, one, or more. The trigger will only fire once per DML.

-Mike

>Michael
>
>Thanks for the guidance, when the trigger fires, I assume the update/Insert has taken place? and I can then reference it as part of the update statement on the other table?
>
>
>CREATE TRIGGER tr_meetings_insertupdate
> ON meetings
> FOR INSERT, UPDATE
>AS
> IF UPDATE(isCancelled)
>  BEGIN
>   UPDATE calendar
>   SET slottaken = 0
>         WHERE calendar.begintime between meetings.begintime and meetings.endtime
>         and   calendar.roomid = meetings.RoomID
>  END
>
>
>
>Thanks Again
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform