I have this code:
select a.id as tableid,
a.name as tableName,
b.name as columnName,
b.status as columnStatus,
b.type as columnType
from sysobjects a
LEFT JOIN syscolumns b
ON a.id = b.id
WHERE a.name = 'table_name'
现在,columType 显示为数字。我想获取该 columnType 的名称,该名称位于表 'systypes' 的列 'name' 中。我该如何做?简单的 LEFT JOIN 会导致重复行。
usertype
而不是type
似乎提供了所需的结果。虽然这是一个旧的帖子,但为了确认是否有其他人遇到类似的问题,我还是要确认一下。 - Gentle