简体   繁体   English

找不到数据类型的地理位置

[英]Cannot find data type geography

I'm using SQL Server 2008 R2 and I can't seem to be able to use the geography column type it's meant to have. 我正在使用SQL Server 2008 R2,我似乎无法使用它的意图所具有的地理列类型。 It doesn't show up in the data type column when I create a new column and when I run this code: 在创建新列时以及运行此代码时,它不会显示在数据类型列中:

CREATE TABLE [Core].[Address2](
 [Geo_Id] [geography] NULL);

I get 我明白了

Column, parameter, or variable #2: Cannot find data type geography. 列,参数或变量#2:找不到数据类型地理。

Am I doing something wrong or do I need to enable the new data types somehow? 我做错了什么或者我是否需要以某种方式启用新数据类型?

冒着明显的风险,我会仔细检查以确保您使用的数据库确实在SQL 2008实例上。

I have found that when you add a geography column you need to restart the Management Studio in order for it to appear in intellisense. 我发现当您添加地理列时,需要重新启动Management Studio才能使其显示在intellisense中。 This might be the issue you are having perhaps? 这可能是你可能遇到的问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM