【发布时间】:2012-02-22 13:20:44
【问题描述】:
如果使用 sql 查询不存在优势数据库服务器,我在创建索引时遇到问题。
我的查询如下所示:
If not Exists(<SELECT Query for amount of indizes for one column>) then
Create Index Test on Tablename (No); endif
所以我不使用 FullTextSearchIndizes,因为它是一个整数字段。否则它看起来像这样:
If not Exists(SELECT * FROM tablename WHERE CONTAINS( * , 'Test' )) then
Create Index Test on Tablename (Name) Content; endif
所以,我唯一的问题是如何获取索引。我在其他 DBMS 中阅读过,您可以使用 sys.indexes 和其他一些东西。
【问题讨论】:
标签: sql indexing advantage-database-server