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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to Create a trigger for a table

Author  Topic 

palaparu
Starting Member

20 Posts

Posted - 2010-10-29 : 16:18:35
How to Create a trigger for a table

after trigger - It must contain Insert, update and delete

nr
SQLTeam MVY

12543 Posts

Posted - 2010-10-29 : 16:22:06
create trigger xxxx on table ttttt for insert, update, delete
as


you can then use the inserted and deleted tables to access the before and after copies of the afected rows.
Have a look at
http://www.nigelrivett.net/SQLTriggers/Triggers_1_A_beginners_guide.html

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -