Link to home
Start Free TrialLog in
Avatar of TomPreen
TomPreen

asked on

SQL transaction query

I have a coded process for a SQL transaction that updates multiple tables :-
BEGIN TRANSACTION
update table 1
If succeeds
       update table 2
       if succeeds
           COMMIT TRANSACTION
       else
           ROLLBACK TRANSACTION
       endif
endif

On checking the data only table 2 is updated.
Please advise what I am missing.
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Above pseudocode seems to be fine..
Can you post your problematic script to check and confirm..
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial