How to create trigger
Database
2
Posts
2
Posters
0
Views
1
Watching
-
:confused:Hi Guy's I want to Create a trigger on 'Table1' by which at the time of insertion the same data will be insert in to another table 'Table2' of same database please help me. Sasmi
Try this:
CREATE TRIGGER [InsertIntoTable2] ON [Table1] FOR INSERT AS INSERT INTO Table2 SELECT (Field1, Field2, (and so on)) FROM INSERTED
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.