Equals(=) vs. LIKE

后端 未结 15 2279
情书的邮戳
情书的邮戳 2020-11-22 15:19

When using SQL, are there any benefits of using = in a WHERE clause instead of LIKE?

Without any special operators, LIKE

15条回答
  •  天涯浪人
    2020-11-22 15:29

    = and LIKE is not the same;

    1. = matches the exact string
    2. LIKE matches a string that may contain wildcards (%)

提交回复
热议问题