Home > PHP/MySQL Programming > List of UK counties in SQL & CSV format

List of UK counties in SQL & CSV format

September 19th, 2007

During a recent project, we had to compile a definitive list of counties within the UK (excluding Northern Ireland). This proved harder than we’d anticipated so we thought we’d publish the list in both CSV and SQL formats. Aren’t we lovely?

CSV for List of UK Counties

Download CSV: uk-counties.csv (2KB)

SQL for List of UK Counties

Download SQL: uk-counties.sql (13KB)

The SQL creates a new table in the following format:

CREATE TABLE `tblCounty` (
`fldCountyID` int(10) unsigned NOT NULL auto_increment,
`fldCountry` varchar(100) NOT NULL default '0',
`fldCounty` varchar(100) NOT NULL default '',
`fldDateAdded` int(10) NOT NULL default '0',
`fldDateModified` int(10) NOT NULL default '0',
PRIMARY KEY (`fldCountyID`)
);
For more information on web development please contact us on +44(0)1202 315285 or info@acmultimedia.co.uk. Learn more about AC Multimedia.
Bookmark and Share

PHP/MySQL Programming

  1. Archive
    March 25th, 2009 at 16:26 | #1

    I agree, well said. Very good website.

  2. Archive
    March 25th, 2009 at 16:26 | #2

    thanks.. this will really help us..

  3. Archive
    March 25th, 2009 at 16:26 | #3

    Beware that the list is not comprehensive. Files have some ommissions which soon become apparent such as Berkshire and Herefordshire.

  4. Archive
    March 25th, 2009 at 16:26 | #4

    Also East Riding of Yorkshire is missing

  5. Archive
    March 25th, 2009 at 16:26 | #5

    The list is incomplete.

    Where is BANES (Bath and North East Somerset) formely know as AVON?

  6. Archive
    March 25th, 2009 at 16:27 | #6

    I have a better list, where do I upload it ?

  7. Archive
    March 25th, 2009 at 16:27 | #7

    Thanks! This should def come in handy.

  8. Archive
    March 25th, 2009 at 16:27 | #8

    You beauties

  9. Archive
    March 25th, 2009 at 16:27 | #9

    Great Thaks

  10. Archive
    March 25th, 2009 at 16:28 | #10

    Nice idea, but what are these supposed to be? Postal counties? Administrative counties? Traditional (pre 1974) counties? Not your fault that due to insessant government meddling the UK county structure is a total shambles, but it is not clear what your list is supposed to represent.

  11. Archive
    March 25th, 2009 at 16:28 | #11

    Many thanks for providing this guys. Super useful for something Im working on too.

  12. Archive
    March 25th, 2009 at 16:28 | #12

    Indeed you are lovely. Many thanks :)

    Really helpful for a project I’m working on…

  13. Archive
    March 25th, 2009 at 16:29 | #13

    not an easy task but I found this and thought it useful…
    http://www.abcounties.co.uk/counties/list.htm

  14. Archive
    March 25th, 2009 at 16:29 | #14

    Saved me a pile of work. Thanks Very.

  15. April 3rd, 2009 at 09:56 | #15

    Thanks a million. You just saved me a ton of work!

  16. Colin
    June 4th, 2009 at 11:38 | #16

    @Archive
    Even with a cursory glance, this link is full of errors - Bristol apparently is in Gloucestershire, St Ives apparently is in Huntingdonshire.

  17. June 4th, 2009 at 16:53 | #17

    Why spend your time doing all this work when it’s available in places that needed and need it updated on a regular basis. One such place is any only shop and so a simple visit to http://www.oscommerce.com –> look for the contributions link and when there look for ZONES.

    In their you will find all the postage place you could ever want for any part of the world. You just need to do a bit of editing because it’ll be in SQL form.

    Handyman.

  1. No trackbacks yet.