简体   繁体   中英

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. 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.

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. This might be the issue you are having perhaps?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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