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
 Rollback Tranction In Store Procedure

Author  Topic 

amirs
Constraint Violating Yak Guru

260 Posts

Posted - 2008-10-14 : 00:30:21
Dear Sql Team Member

Please send following correct answer

I have insert three table in use store procedure
to insert thrird table use insert triger. suppose first two table insert record and third table insert fail so what will be the first two table it is rollback or not

thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-10-14 : 00:40:27
a) 1 and 2 us not rollbacked, 3 is rollbacked.
b) 1 is not rollbacked, 2 and 3 is rollbacked

It depends whether or not you are using the new SQL Server 2005 OUTPUT clause.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-10-14 : 00:40:28
a) 1 and 2 us not rollbacked, 3 is rollbacked.
b) 1 is not rollbacked, 2 and 3 is rollbacked

It depends whether or not you are using the new SQL Server 2005 OUTPUT clause.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -