Oracle: How to update master with newest row from detail table?

Posted by LukLed on Stack Overflow See other posts from Stack Overflow or by LukLed
Published on 2010-05-13T20:01:13Z Indexed on 2010/05/13 20:04 UTC
Read the original article Hit count: 181

Filed under:
|
|

We have two tables:

Vehicle: Id, RegistrationNumber, LastAllocationUserName, LastAllocationDate, LastAllocationId Allocations: Id, VehicleId, UserName, Date

What is the most efficient (easiest) way to update every row in Vehicle table with newest allocation? In SQL Server I would use UPDATE FROM and join every Vehicle with newest Allocation. Oracle doesn't have UPDATE FROM. How do you do it in Oracle?

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about oracle9i