For the example, it is not the SELECT statement that caused the problematic lock, but the UPDATE statement executed just before the SELECT statement in the same transaction.
例如,不是select语句造成产生问题的锁,但update语句恰好在同一事务中在select语句前执行。
The update clause will ensure that an update lock is held on the selected rows.
更新子句将确保更新锁定在被选择的行上。
The normal behaviour of a database access is to get a read lock on the queried data, which gets transformed into an update lock if data is updated.
数据库访问通常会对被查询的数据进行读锁定,在数据更新后会变成更新锁定。
应用推荐