如何在SQL中启用全文检索功能2007-12-27全文索引的一个例子,在查询分析器中使用:use pubsgo--打开数据库全文索引的支持execute sp_fulltext_database "enable"go--建立全文目录ft_titlesexecute sp_fulltext_catalog "ft_titles", "create"go--为titles表建立全文索引数据元,UPKCL_titleidind是主键所建立的唯一索引,可由sp_help titles得知execute sp_fulltext_table "titles","create", "ft_titles", "UPKCL_titleidind"go--设置全文索引列名exec sp_fulltext_column "titles", "title", "add"goexec sp_fulltext_column "titles", "notes", "add"go--建立全文索引exec sp_fulltext_table "titles", "activate"go--填充全文索引目录exec sp_fulltext_catalog "ft_titles", "start_full"go--使用contains和freetextselect title, notes from titleswhere contains(title, ""computer Cooking"")goselect title, notes from titleswhere freetext(title, "computer Cooking")goselect title, notes from titleswhere freetext(title, ""computer Cooking"")goselect title, notes from titleswhere contains(title, "computer")goselect title, notes from titleswhere freetext (*, "computer")go