首页 > 其他 > 详细

【单条记录锁】select single for update

时间:2015-12-02 11:57:32      阅读:614      评论:0      收藏:0      [点我收藏+]

DATA: wa_t001 type t001.

select single for update * into wa_t001 from t001 where bukrs = ‘1000‘.

 

解释:

select single for update,where条件必须涵盖所有主键。

执行时,该语句会锁定满足条件的单条数据(在SM12中是看不到的)。

锁定退出条件:执行到commit或rollback。

补充:

如果有其他的select single for update访问到同样的数据,会一直等待直到被锁定的记录解锁。

 

---------------------------

本博客所有原创文章,未经博主允许,请勿转载。

【单条记录锁】select single for update

原文:http://www.cnblogs.com/abap-ll/p/5012287.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!