TSQL-为什么在创建nVarChar列时创建sysname?

TSQL-为什么在创建nVarChar列时创建sysname?,tsql,nvarchar,Tsql,Nvarchar,我的tsql数据表中有一个表: CREATE TABLE dbo.Test ( Col nVarChar (50) null ) GO 然后我执行了查询: Select c.name As Name, ty.name as Type, c.max_length As MaxLenght, c.precision As Precision, c.scale As Scale, c.is_nullable As IsNullable, * From sys.schema

我的tsql数据表中有一个表:

CREATE TABLE dbo.Test
(
     Col nVarChar (50) null
)
GO
然后我执行了查询:

Select 
    c.name As Name, ty.name as Type, c.max_length As MaxLenght, c.precision As Precision, c.scale As Scale, c.is_nullable As IsNullable, *
From
    sys.schemas s
    inner join sys.tables t on s.schema_id = t.schema_id
    inner join sys.columns c on t.object_id = c.object_id
    inner join sys.types ty on ty.system_type_id = c.system_type_id
Where
    s.name LIKE 'dbo' AND t.name LIKE 'Test'
问题是。。。为什么会有

检查以下内容:

SELECT ROW_NUMBER() OVER(PARTITION BY system_type_id ORDER BY system_type_id)
      , *
FROM sys.types;
检查第一列的值是否大于1

很少有类型映射到相同的
系统类型\u id
。有些名字只是其他名字的别名

更新 解决相同的问题…

请检查:

SELECT ROW_NUMBER() OVER(PARTITION BY system_type_id ORDER BY system_type_id)
      , *
FROM sys.types;
检查第一列的值是否大于1

很少有类型映射到相同的
系统类型\u id
。有些名字只是其他名字的别名

更新 解决同样的问题