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

后端 未结 7 2098
渐次进展
渐次进展 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.

    0 讨论(0)
提交回复
热议问题