我一直在输入以下 SQL 语句,但没有出现任何结果,我也不知道为什么。 phpMyAdmin 上的错误为:
#1191 - Can't find FULLTEXT index matching the column list
这是我的 SQL 语句:
SELECT *, MATCH(subj_name, course_name, content_type) AGAINST('math, statistics,
test') AS score from table1 WHERE MATCH(subj_name, course_name, content_type)
AGAINST('math, statistics, test') ORDER BY score desc;
这就是我制作索引的方式:
ALTER TABLE table1 ADD FULLTEXT(subj_name, course_name, content_type);
最佳答案
尝试添加
ALTER TABLE table1 ADD FULLTEXT fulltext_index(subj_name, course_name, content_type);
关于mysql - MySQL FULLTEXT 索引的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7457731/