SQL Server 的国家/地区列表 [英] Country, state list for SQL Server

查看:37
本文介绍了SQL Server 的国家/地区列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在应用程序中,我需要列出世界上所有国家/地区,我们选择一个国家/地区,应列出与其对应的所有州,如果我选择该州的所有城市作为州,则应列出该州.

Hi In a application i need to list all countries in the world , we i select a country all the states corresponding to it should be listed, if i select as state all the cities in that state should listed.

我在 SQL Server 2005 中创建了包含引用的表.

I have created the tables with references in SQL Server 2005.

我需要国家、州、城市的完整数据列表 有没有可用的解决方案或包或文件,以便我们可以导入 SQL Server.

I need the complete data list of countries , states, cities Is there any solution or packages or files available so that we can import to SQL Server.

推荐答案

ISO 国家代码位于 这里.您可以下载多种格式(CSV 等)并使用 DTS 或类似产品,您应该能够将它们导入到您的数据库中.

ISO country codes are here. You can download this in a number of formats (CSV etc) and using DTS or a similar product you ought to be able to import them into your database.

一旦您深入了解国家/地区的州或地区,它就会变得有点棘手.您可能必须自己将这些放在一起,或搜索提供它们的单个资源.

Once you get down to states or regions in countries it gets bit trickier. You may have to put these together yourself, or search for individual resources that provide them.

我在此处找到了 MySQL 格式的美国州 - 您可能可以轻松适应.

I found the US States here, in MySQL format - which you can probably easily adapt.

这篇关于SQL Server 的国家/地区列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆