MySQL: What is a reverse version of LIKE?

前端 未结 3 2051
清酒与你
清酒与你 2020-11-27 06:00

LIKE operator in MySql is used to find rows that contain our query text, for example:

select name from user where name like \"%john%\"
3条回答
  •  难免孤独
    2020-11-27 06:33

    This is a text indexing problem. If I get it right, your task is to find all references to people in a free-form text, and has nothing to do with LIKE or NOT LIKE.

    In a general form, the database table against which you're looking for references acts as a dictionary to some text-indexing algorithm. Build an index on input string using this dictionary and hopefully you will get some matches.

提交回复
热议问题