title: Oracle locking with SELECT...FOR UPDATE OF
body: <p>I'm selecting from tables FOO and BAR.  I'd like to lock the records of FOO which are being returned, but I don't want the records of BAR to be locked.</p>
  
  <pre><code>cursor c_foobar is 
  select foo.*, bar.* from
  foo, bar
  where foo.id = bar.foo_id
  for update of &lt;what should I put here?&gt;
  </code></pre>
  
  <p>It seems like I need to specify individual columns, but I want the entire record of foo to be locked.  e.g. I wish I could do something like:</p>
  
  <pre><code>cursor c_foobar is
  select foo.*, bar.* from
  foo, bar
  where foo.id = bar.foo_id
  for update of foo
  </code></pre>
  
  <p>Do I have to enumerate every column of foo in the <code>for update of</code> section in order to lock them all?  Or can I arbitrarily choose any column in foo, even those which are not its primary key, and it will lock the entire record?</p>