Equals(=) vs. LIKE

后端 未结 15 2265
情书的邮戳
情书的邮戳 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:35

    In Oracle, a ‘like’ with no wildcards will return the same result as an ‘equals’, but could require additional processing. According to Tom Kyte, Oracle will treat a ‘like’ with no wildcards as an ‘equals’ when using literals, but not when using bind variables.

提交回复
热议问题