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

前端之家收集整理的这篇文章主要介绍了sql server中查找特定类别的列的写法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<div class="codetitle"><a style="CURSOR: pointer" data="19375" class="copybut" id="copybut19375" onclick="doCopy('code19375')"> 代码如下:

<div class="codebody" id="code19375">
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)

猜你在找的MsSQL相关文章