Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mutating table in SQL Server 2000 triggers

Status
Not open for further replies.

fixthebug2003

Programmer
Oct 20, 2003
294
US
Hi,
Is there a concept of Mutating table in Triggers like we have in oracle triggers.
In Oracle, A mutating table is a table that is being modified by a DML. So for a Trigger, a Mutating table is the table on which the Trigger is written.And the rules are :
The SQL Stmts in a Trigger Body may not:
1.Read from or Modify any mutating table of the triggering stmt
2. Read from or Modify the primary, Unique or Foriegn Key Columns of a constraining table of the triggering table. They may modify the other columns if desired.

Is there any rules like this for Triggers in SQL Server 2000?

Fixthebug2003
 
Hi,

I'm not an Oracle guy - but I did do a little research on your question. From what I've read, there is no SQL Server issue with referencing modified data. SQL Server statement level triggers are allowed to reference the changing data, and will not produce a mutating error.





Best Regards,
Joseph Sack, Author of "SQL Server 2000 Fast Answers for DBAs and Developers".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top