title: find out country wise all states and states wise cities from database using join
body: <p>find out country wise all states and states wise cities from database using join </p>
  
  <p>I have three tables in database i.e countries, states, cities
  I am giving mapping between them using primary key and foreign key.
  I want specific 'India' country and related that country all states and cities...How can I do???
  Here I am giving my code...which I am created..Give me any other suggestion</p>
  
  <pre><code>select countries.name as country,
  states.name as state,
  cities.name as city
  from states inner join cities
  on states.id = cities.state_id
  inner join countries
  WHERE countries.name='India';
  </code></pre>