sql-server-2008 – 如何在SQL Server 2008中的数据库上查找全文索引?

前端之家收集整理的这篇文章主要介绍了sql-server-2008 – 如何在SQL Server 2008中的数据库上查找全文索引?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
嗨,我正在寻找能够使用sql Server 2008在数据库中的所有表和列上查找全文索引的查询.欢迎提供任何信息或帮助

解决方法

这是你如何得到它们
SELECT 
    t.name AS TableName,c.name AS FTCatalogName,i.name AS UniqueIdxName,cl.name AS ColumnName
FROM 
    sys.tables t 
INNER JOIN 
    sys.fulltext_indexes fi 
ON 
    t.[object_id] = fi.[object_id] 
INNER JOIN 
    sys.fulltext_index_columns ic
ON 
    ic.[object_id] = t.[object_id]
INNER JOIN
    sys.columns cl
ON 
        ic.column_id = cl.column_id
    AND ic.[object_id] = cl.[object_id]
INNER JOIN 
    sys.fulltext_catalogs c 
ON 
    fi.fulltext_catalog_id = c.fulltext_catalog_id
INNER JOIN 
    sys.indexes i
ON 
        fi.unique_index_id = i.index_id
    AND fi.[object_id] = i.[object_id];
原文链接:https://www.f2er.com/mssql/75321.html

猜你在找的MsSQL相关文章