首页 > 数据库 > SQL Server > 正文

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

2020-04-27 20:47:53
字体:
来源:转载
供稿:网友

复制代码 代码如下:


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)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表