Obtain cluster index information in the SQLServer Database

Source: Internet
Author: User
No SELECTt is used to obtain cluster index information in the SQLServer database. name [Table name], ix. name [Cluster Index name], c. name [clustering index includes fields] fromsys. indexesixINNERJOINsys. tablestONix. object_idt.object_idANDix.type_descCLUSTEREDANDt.typeUINNERJOIN

No SELECT t is used to obtain cluster index information in the SQLServer database. name [Table name], ix. name [Cluster Index name], c. name [clustering index includes fields] from sys. indexes ixINNER JOIN sys. tables t ON ix. object_id = t. object_id AND ix. type_desc = 'clustered' AND t. type = 'U' INNER JOIN

Obtain cluster index information in the SQL Server database <无>
SELECT t. name [Table name], ix. name [Cluster Index name], c. name [clustering index includes fields] from sys. indexes ixINNER JOIN sys. tables t ON ix. object_id = t. object_id AND ix. type_desc = 'clustered' AND t. type = 'U' inner join sys. index_columns ic ON ic. index_id = ix. index_id and ix. object_id = ic. object_idINNER JOIN sys. columns c ON ic. column_id = c. column_id and ic. object_id = c. object_idORDER BY [Table name]?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.