【发布时间】:2010-06-18 14:22:56
【问题描述】:
我从 FOO 和 BAR 表中进行选择。我想锁定正在返回的 FOO 的记录,但我不想锁定 BAR 的记录。
cursor c_foobar is
select foo.*, bar.* from
foo, bar
where foo.id = bar.foo_id
for update of <what should I put here?>
似乎我需要指定单个列,但我希望锁定 foo 的整个记录。例如我希望我能做这样的事情:
cursor c_foobar is
select foo.*, bar.* from
foo, bar
where foo.id = bar.foo_id
for update of foo
我是否必须枚举for update of 部分中的每一列 foo 才能将它们全部锁定?或者我可以任意选择 foo 中的任何列,即使是那些不是它的主键的列,它会锁定整个记录?
【问题讨论】: