I have some doubts on transactions. Following is my problem & I'm intended to go with transactions .
I have a stored procedure. If it ran successfully then no problem, in case of any interruption like killing the SP or some error occurred while in the middle of the run then I have to rollback all the things which was done by sp so far.
So I'm intended to go with transactions .
If I create transaction it will make the roll back easy to me.
1. I need code which will automatically rollback when any error while in the run of whole
2. What would happen if the sp killed forcibly .i.e., will transaction commuted or rolled back ?
Thanks in Advance