Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 2005 如何查找SQL全文索引使用的唯一表索引_Sql Server 2005 - Fatal编程技术网

Sql server 2005 如何查找SQL全文索引使用的唯一表索引

Sql server 2005 如何查找SQL全文索引使用的唯一表索引,sql-server-2005,Sql Server 2005,如何发现全文索引引用的唯一表索引的名称?SQL生成响应是最有用的,但GUI(SSMS)解决方案也会起作用。此查询应该可以做到这一点-适用于SQL Server 2005及更高版本: SELECT OBJECT_NAME(fti.object_id) AS 'Table Name', i.name AS 'Index Name', c.name AS 'Column Name' FROM sys.fulltext_indexes fti INNER JOIN

如何发现全文索引引用的唯一表索引的名称?SQL生成响应是最有用的,但GUI(SSMS)解决方案也会起作用。

此查询应该可以做到这一点-适用于SQL Server 2005及更高版本:

SELECT 
    OBJECT_NAME(fti.object_id) AS 'Table Name',
    i.name AS 'Index Name',
    c.name AS 'Column Name'
FROM 
    sys.fulltext_indexes fti
INNER JOIN 
    sys.index_columns ic ON ic.object_id = fti.object_id AND ic.index_id = fti.unique_index_id
INNER JOIN 
    sys.columns c ON c.object_id = ic.object_id AND c.column_id = ic.column_id
INNER JOIN
    sys.indexes i ON fti.unique_index_id = i.index_id AND fti.object_id = i.object_id
马克