| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Query optimisation
> Two tables Locations and Data
> Locations has PK Location Key Id
> Data has FK Location Key Id
>
> The query
>
> SELECT *
> FROM locations
> WHERE locations.[location key id]
> IN
> (SELECT distinct Data.[Location Key Id]
> FROM Data
> WHERE Data.[Customer Key Id]= " & G_Customer_Key_Id & ");"
SELECT *
FROM locations, data
WHERE Data.[Customer Key Id]= " & G_Customer_Key_Id & ")"
and locations.[location key id] = Data.[Location Key Id];
Received on Wed Aug 06 2003 - 11:10:07 CDT
![]() |
![]() |