MySQL Wildcards * and %

后端 未结 2 1007
感情败类
感情败类 2020-12-03 03:15

What is the difference between % and * wildcards in MySQL?

In a query like so : \"SELECT * FROM $table WHERE MATCH (message) AGAINST(

2条回答
  •  -上瘾入骨i
    2020-12-03 03:21

    "An asterisk is the truncation operator. Unlike the other operators, it is appended to the word, or fragment, not prepended."

    This only applies to MATCH() ... AGAINST() statements.

    The % is a LIKE wildcard and has nothing to do with the MATCH() ... AGAINST().

    I hope that helps.

提交回复
热议问题