不通过鼠标右键,如何获得某个索引的创建语句网上找了一天的资料了,都没找到而且我发现sp_helptext里面只有视图,触发器,存储过程和其他的一些创建语句,唯独没有索引的创建语句大侠们帮忙想想看咋整

解决方案 »

  1.   


    create index ....... -- 详细请看MSDN
      

  2.   

    exec sp_helpindex tb
    index_name index_description index_keys
    -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    in_name nonclustered located on PRIMARY name
      

  3.   

    或者ssms里直接右键那个index选择script index as -> create to ->任选一个打开方式