SQL UPDATE order of evaluation

前端 未结 3 1195
青春惊慌失措
青春惊慌失措 2020-11-29 07:48

What is the order of evaluation in the following query:

UPDATE tbl SET q = q + 1, p = q;

That is, will \"tbl\".\"p\" be set to

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 08:28

    The write to the table has to occur after transaction that was well under way when the read was completed.

提交回复
热议问题