Mysql必知必会 SELECT note_text, Match(note_text) Against(‘rabbit’) AS rank FROM productnotes;
Mysql必知必会里 全文本搜索章节中有一段代码
SELECT note_text, Match(note_text) Against('rabbit') AS rank FROM productnotes;
在mysql 8.x 版本中会报错
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank FROM productnotes' at line 1
是因为rank
和mysql 关键字重名
将rank
更改一下即可,如改为rank_rabbit