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.
Author |
Topic |
shinelawrence
Starting Member
32 Posts |
Posted - 2013-04-19 : 02:02:25
|
Hi Everyone, If i inserted 10 or more than records inserted in one table when i insert one table then automatically insert in another table. I used trigger but first row insert in another table. How to insert all the records.. Please tell the solution...Thanks In AdvancedLawce |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-19 : 02:25:46
|
something likeCREATE TRIGGER TriggerNameON Table1AFTER INSERT ASBEGININSERT INTO Table2SELECT *FROM INSERTEDEND I'm assuming both tables have same structure otherwise you've specify column list in INSERT and SELECT------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
shinelawrence
Starting Member
32 Posts |
Posted - 2013-04-19 : 02:27:56
|
oh...k...thank u very much...Lawce |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-04-19 : 02:41:37
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|