Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是什么意思
与 BEFORE 行触发器不同,AFTER 行触发器锁定行
我从下面的链接得到这个声明:
docs.oracle.com/cd/B10500_01/server.920/a96524/c18trigs.htm
它关于 AFTER ROW 触发器。根据文档,“在修改受触发语句影响的每一行并可能应用适当的完整性约束后,只要不违反触发器限制,就会对当前行运行触发器操作。与 BEFORE 行触发器不同,AFTER 行触发器会锁定行。 "
这意味着 AFTER ROW 触发器在完成扩展操作之前对受影响的行应用锁,以保证数据完整性,而 BEFORE ROW 触发器不对尚未受影响的行应用任何锁。