writing a basic trigger in SQL 2005

I would like to create a trigger in a SQL 2005 database to run a table update script that I have created.  I would like the trigger to execute my update script whenever data is inserted or updated into the table.  It should not be very complicated.

Could someone please share with me the syntax on how to create such a trigger?  I'd be grateful.
LVL 1
apitechAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
rushShahConnect With a Mentor Commented:
try this.


CREATE TRIGGER reminder1
ON Sales.Customer
AFTER INSERT, UPDATE 
AS 
--Execute Your Update Script
GO

Open in new window

0
 
meko72Commented:
Here is some links I found that might help you.

http://msdn.microsoft.com/en-us/library/ms189799.aspx

http://msdn.microsoft.com/en-us/library/ms190273.aspx

http://ss64.com/sql/   ( 2005 Sql Commands A-Z)

Hope this helpds
0
 
rocky_lotus_newbieCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.