您的位置:首页 > 博客中心 > 数据库 >

SQL Server 查看指定表上的索引

时间:2022-03-14 01:13

解决方案:

            sys.indexs;

----------------------------------------------------------------------------------------------------------------------------------

前期准备:

            建表、

                  create table T(X int primary key,Y int);
                  go

            建索引
                  create index ix_for_T_y on T(Y);
                  go

-------------------------------------------------

例子:

      查看表中的索引

      select * from sys.indexs where object_id = OBJECT_ID(‘T‘);

     gxlsystem.com,布布扣

 

热门排行

今日推荐

热门手游