2013-06-18 40 views
1

在SQL Server 2012数据库中,我尝试创建多个表将使用的用户定义数据类型。SQL Server 2012无法为表设计器中的列选择UDT

我创建了数据类型,但是当我尝试修改现有表(设计视图)时,我无法选择刚刚创建的UDT。我不断收到错误消息'无效的数据类型'。我无法为新列或新表选择它。

回答

0

我试着通过CREATE TABLE脚本创建一个表,发现我能够使用UDT,尽管intellisense告诉我这不是一个公认的类型。

当我试图在设计器模式下打开表格时,我终于得到了我需要的来自SQL的信息。

Table 'Tag' could not be loaded. 

The table being loaded into memory has a user-defined data type 
('DM_DESC_100') that is not recognized. 
Close all of your open database diagram and table designer windows. 
The new data type will be recognized when you re-open the diagram or 
table designer. 

果然,当我这样做的时候,突然间我可以在表格设计器中选择我的UDT。