码迷,mamicode.com
首页 > 数据库 > 详细

读取MSSQL数据库所有索引

时间:2014-10-22 12:37:41      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:数据   on   as   数据库   sql   type   text   关系   rom   

select  a.name as tabname
,h.name as idname
from sys.objects as a
right join sys.indexes as h on a.object_id=h.object_id
where a.type<>‘s‘
go
由于索引和系统列没有直接对应关系 所以不能直接查看列字段和字段长度

读取MSSQL数据库所有索引

标签:数据   on   as   数据库   sql   type   text   关系   rom   

原文地址:http://www.cnblogs.com/scenic/p/4042633.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!