mySql全文索引查詢

2021-10-06 08:31:47 字數 298 閱讀 4696

使用全文索引首先需要資料的搜尋引擎是myisam,innodb不支援全文索引

1.把你要查詢的字段設定全文索引:

alter table sn_ly_peopleinfo add fulltext tel(phone)

2.執行sql語句:

select * from sn_ly_peopleinfo where match(phone) against('15044087776') and name_man='aa'

我用到的是**號碼的全文索引的查詢,全文索引不支援中文字元,如果是中文最後不要用全文索引

mysql全文索引的坑 MySQL全文索引問題

我有乙個包含以下資料的 文章 mysql select from articles id title body 1 mysql tutorial dbms stands for database 2 how to use mysql well after you went through a 3 o...

mysql全文索引

了解 solr 之後 發現全文索引也能做檢索 故了解了下 筆記如下 建立全文索引 alter table table add fulltext index fulltext table 列1 列2 查詢方式 select from table where match 列1 列2 against 查詢...

mysql全文索引

舊版的mysql的全文索引只能用在myisam 的char varchar和text的字段上。不過新版的mysql5.6.24上innodb引擎也加入了全文索引,所以具體資訊要隨時關注官網,create table article id int auto increment not null pri...