数据库小技能:Oracle基础之【锁】

I 锁

什么是锁?
锁(lock)机制用于管理对共享资源的并发访问。

1.1 锁定数据行

for update for update nowait 是对操作的数据行进行加,在事务提交前防止其他操作对数据的修改。

锁定了emp表中id=1的那行数据

select * from emp  where emp.id=1 for

猜你喜欢

转载自blog.csdn.net/u011018979/article/details/128718548