我想craete全文索引在我的表列但它給我錯誤。全文索引不創建
我的查詢如下:
create table products
(
p_id int primary key,
p_name varchar(50),
)
insert into products values(1,'Sugar')
insert into products values(2,'Tea')
insert into products values(3,'Flour')
insert into products values(5,'Soap')
create index pname on products(p_name)
select * from products
create fulltext catalog product as default
create fulltext index on products(p_name) key index pname on product
它給這個錯誤:
Msg 7653, Level 16, State 2, Line 1 'pname' is not a valid index to enforce a full-text search key. A full-text search key must be a unique, non-nullable, single-column index which is not offline, is not defined on a non-deterministic or imprecise nonpersisted computed column, does not have a filter, and has maximum size of 900 bytes. Choose another index for the full-text key.
好的謝謝你解決我的問題。 – Mufasil