zoe
zoe

Reputation: 945

SQL Server - For Insert trigger

With 'For Insert' trigger, are rows inserted to the table yet when it is triggered?

  CREATE Trigger check_availability on Room
       For Insert, Update

Thanks!

Upvotes: 1

Views: 111

Answers (1)

ethorn10
ethorn10

Reputation: 1899

Yes.

CREATE TRIGGER

FOR | AFTER

    AFTER specifies that the DML trigger is fired only when all operations specified in the triggering SQL statement have executed successfully. All referential cascade actions and constraint checks also must succeed before this trigger fires.

    AFTER is the default when FOR is the only keyword specified.

    AFTER triggers cannot be defined on views.

Upvotes: 2

Related Questions