Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 raise a trigger when ever my table gets updated

Author  Topic 

sqllover
Constraint Violating Yak Guru

338 Posts

Posted - 2008-12-18 : 01:08:46
hi,

i just need when ever my table gets updated i need to call a trigger.because in that trigger i have written some DML statements.is this possible to do? if means please show me some sample

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-18 : 01:10:33
[code]
CREATE TRIGGER YourTriggerNameHere
ON YourTableNameHere
AFTER UPDATE
AS
BEGIN
--
--Your DML statements
--
END
[/code]
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-18 : 01:12:07
also see this

http://doc.ddart.net/mssql/sql70/create_8.htm
Go to Top of Page

sqllover
Constraint Violating Yak Guru

338 Posts

Posted - 2008-12-18 : 02:56:28
Thank you visakh16
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-18 : 02:57:57
welcome
Go to Top of Page
   

- Advertisement -