What's the point to enclose select statements in a transaction?

后端 未结 7 2252
渐次进展
渐次进展 2021-01-31 16:16

What\'s the point to enclose select statements in a transaction? I think select statements are just \"GET\" data from the database, they don\'t have chance to rollback something

7条回答
  •  无人共我
    2021-01-31 17:07

    No.

    A transaction gives you a consistent view of the database.

    If you want your selects to return the same results when you repeat them, a transaction can provide that.

提交回复
热议问题