sql server中查找特定種別的列的寫法。本站提示廣大學習愛好者:(sql server中查找特定種別的列的寫法)文章只能為提供參考,不一定能成為您想要的結果。以下是sql server中查找特定種別的列的寫法正文
select a.name, o.name AS TableName, o.type, a.id, o.object_id, o.schema_id
FROM sys.syscolumns AS a INNER JOIN sys.systypes AS b ON a.xtype = b.xtype
AND b.name = 'nvarchar'
INNER JOIN
sys.objects AS o ON a.id = o.object_id
WHERE (o.type = 'u')
AND (o.schema_id = 1)