When should I use transactions in my queries?

后端 未结 5 1848
轮回少年
轮回少年 2020-12-13 05:06

I\'m reading very detailed tutorials on how to use transactions with database types and database engines, but I haven\'t found a guide that teaches me when and why I should

5条回答
  •  遥遥无期
    2020-12-13 05:10

    Basically any time you have a unit of work that is either sensitive to outside changes or needs the ability to rollback every change, if an error occurs or some other reason.

    Look here for some excellent answers and their reasons for using them.

提交回复
热议问题