• Sergiy (12/7/2016)


    Index name is not a really good indicator of index existence.

    You may have many identical indexes, all with different names.

    To check if an index with the same structure as you intend to create already exists you need to join sysindexes to sysindexkeys and then to syscolumns.

    This way you may find if an index with the specified set of columns (name in syscolumns) in the specified order (keyno on sysindexkeys) already exists.

    Two follow up questions:

    1) Does my reference to the specific object id not already do that?

    2) If it doesn't, can you point out why and if there's a specific reason to use legacy views?

    Executive Junior Cowboy Developer, Esq.[/url]