View Single Post
  #4 (permalink)  
Old September 28th, 2004, 02:55 AM
Anantsharma Anantsharma is offline
Friend of Wrox
 
Join Date: Sep 2004
Location: New Delhi, Dekhi, India.
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Anantsharma Send a message via Yahoo to Anantsharma
Default

Select Pro.* from Properties Pro Inner Join Areas AR on
Pro.areaid=Ar.areaid Inner Join Preference Pre on
AR.Preid=Pre.Preid
Where Pre.Preid= 3 AND
Pro.Type= 2

I feel that u r having redundant Preid colum. In Area Table there is a preid. If so, u don't have to Join Third table Preference. The Query can be :-

Select Pro.* from Properties Pro Inner Join Areas AR on
Pro.areaid=Ar.areaid Where AR.Preid= 3 AND
Pro.Type= 2


Hope this helps

B. Anant
Reply With Quote