Full text search vs LIKE

前端 未结 6 1895
长情又很酷
长情又很酷 2021-02-04 01:45

My question is about using fulltext.As I know like queries which begin with % never use index :

SELECT * from customer where name like %username%
6条回答
  •  南旧
    南旧 (楼主)
    2021-02-04 01:52

    You can use:

    SELECT * from customer where CONTAINS(name, 'username')
    

    OR

    SELECT * from customer where FREETEXT(name, 'username')
    

提交回复
热议问题