Home > database >  Essentially a comprehensive design
Essentially a comprehensive design

Time:11-22

Problem: respectively for two tables in the same field data is modified, the transaction rollback was used to ensure two tables in the modified data synchronization
Could you tell me how to write the SQL statement to?

CodePudding user response:

 
The set xact_abort on
The begin tran
The update table 1 set [field]=[value] where [filter conditions]
The update table 2 set [field]=[value] where [filter conditions]
Commit tran
  • Related