1

在 SQL Server 2012 数据库中,我正在尝试创建多个表将使用的用户定义数据类型。

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

4

1 回答 1

0

我尝试通过 CREATE TABLE 脚本创建表,发现我能够使用 UDT,尽管智能感知告诉我它不是可识别的类型。

当我尝试在设计器模式下打开表时,我终于从 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。

于 2013-06-18T14:25:21.933 回答