simple query for 3 table JOIN

SELECT a.id,a.location_name,b.city_name,c.country_name FROM hca_location AS a JOIN hca_city AS b ON a.city = b.id JOIN hca_country AS c ON b.country = c.id WHERE b.is_active=’Y’ AND c.is_active=’Y’

Advertisements