sql server中查找特定类别的列的写法

hwong 15 0 PDF 2020-12-17 11:12:34

代码如下: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)

用户评论
请输入评论内容
评分:
暂无评论