欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2023-12-12 08:36:40
复制代码 代码如下:select a.name, o.name as tablename, o.type, a.id, o.object_id, o.schema_id&n...
复制代码 代码如下:

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)

上一篇:

下一篇: