Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Selecting lowest foreign record for each primary key;
Hi,
I have two tables which are linked by an intermediary table, e.g.
Cars = Car_Id, Car_Reg
Drivers = Driver_Id, Driver_Surname
Car_To_Driver = Join_Id, Car_Id, Driver_Id
Each car can have multiple drivers and each driver can have multiple cars.
How can I create a query that will return the Driver with the lowest Driver_Id for each Car?
In Access I used to use the First() function to acheive this.
Thanks,
Matt. Received on Thu Aug 17 2000 - 09:17:59 CDT
![]() |
![]() |