Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Nakul Vachhrajani is a Technical Specialist & Systems development professional with iGATE. He holds a MCTS (SQL Server 2008: Implementation & Maintenance)
Browse by Tags · View All
#SQLServer 233
SQL Server 232
Administration 199
DBA 188
Tips 177
Development 177
T-SQL 172
#TSQL 170
Guidance 114
Tools and Utilities 112

Archive · View All
April 2011 14
March 2012 11
December 2011 11
March 2011 11
December 2012 10
October 2011 10
January 2011 10
January 2013 9
November 2012 9
October 2012 9

#0161 - SQL Server 2012–Deprecated Features-CREATE TRIGGER-WITH APPEND option

May 17 2012 12:00AM by Nakul Vachhrajani   

There would hardly be a database developer who hasn’t written triggers in their career. It is fairly common knowledge that you can have more than one trigger of the same type, i.e. INSERT/UPDATE/DELETE on the same table. Therefore, the following is perfectly valid:

USE tempdb
GO
CREATE TABLE dbo.AppendTriggerTest (RowId INT IDENTITY(1,1),
                                    RowValue VARCHAR(50)
                                   )
GO

CREATE TRIGGER dbo.MainTrigger
ON dbo.AppendTriggerTest
FOR INSERT
AS
BEGIN
  PRINT '<<<< INFO >>>> Main Trigger fired...'
END
GO

CREATE TRIGGER dbo.AppendTrigger
ON dbo.AppendTriggerTest
FOR INSERT
AS
BEGIN
  PRINT '<<<< INFO >>>> Append Trigger fired...'
END
GO

However, this was not the case in the days of SQL Server 6.5. In order to have a more than one trigger of the same type on the same table, the WITH APPEND clause needs to be used, which is effectively interpreted as AFTER. In the days of SQL Server 6.5, the trigger “AppendTrigger” will need to be defined as:

CREATE TRIGGER dbo.AppendTrigger
ON dbo.AppendTriggerTest
FOR INSERT
WITH APPEND     --NOTICE THE WITH APPEND CLAUSE HERE, 
                --DEPRECATED FROM SQL 2012 ONWARDS
AS
BEGIN
  PRINT '<<<< INFO >>>> Append Trigger fired...'
END
GO

Starting SQL Server 2012, the compatibility levels lower than 90 (i.e. SQL Server 2000 and below) are no longer supported. In accordance to this, the WITH APPEND clause has also been deprecated.

I assume that you are not using this in your production code, if you are, please upgrade! There is no workaround/alternate to this.

Reference:

Until we meet next time,

Be courteous. Drive responsibly.

Tags: #SQLServer, SQL Server, #TSQL, T-SQL, Development, Tips, Series, DBA, Administration, Best Practices, Denali


Nakul Vachhrajani
4 · 33% · 10564
10
 
0
Lifesaver
 
 
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"#0161 - SQL Server 2012–Deprecated Features-CREATE TRIGGER-WITH APPEND option" rated 5 out of 5 by 10 readers
#0161 - SQL Server 2012–Deprecated Features-CREATE TRIGGER-WITH APPEND option , 5.0 out of 5 based on 10 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]