Oracle: How to update master with newest row from detail table?
- by LukLed
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?