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)

(0)
上一篇 2022年3月21日
下一篇 2022年3月21日

相关推荐