Skip to content

An SQL dump of Countries with respective states and provinces.

Notifications You must be signed in to change notification settings

kidino/SQL-Countries-States-Provinces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

SQL Countries States Provinces

An SQL dump of Countries with respective states and provinces.

Original source is in XML format from https://blueprints.launchpad.net/openobject-server/+spec/countries-states-and-provinces

I thought I'd make an SQL version. You normally use this for creating dependent drop downs, where you select a country and an option of states or provinces appears.

A simple query to list all countries would be like:

select * 
from states_provinces left join countries 
on states_provinces.country_id = countries.country_id
order by countries.name asc, states_provinces.name asc;

Have fun!

About

An SQL dump of Countries with respective states and provinces.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published