实现代码如下:

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)

以上就是【sql server中查找特定类别的列的写法】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)
发表我的评论

最新评论

  1. 暂无评论