Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sql to update where all related records meet criteria
Two problems: First, your requirements are poorly worded. Exactly
which column do you want to update with data from where when the
stage_fk = 61?
Second, this looks like homework and you would be better off doing it yourself.
The SQL manual has a section on the UPDATE statement with some examples. This seems to be a very basic update
update version set ?1 = ?2 where stage_fk = 61
In this case ?1 is the target column and ?2 is the source of the data and is likely a SELECT statement which would most likely mean you would need some additional where clause conditions limiting the rows affected by the update to matching the souce of the data (hint - see coordinated sub-query)
HTH -- Mark D Powell -- Received on Fri Oct 28 2005 - 09:27:43 CDT