Equal =
looks for equivalence characters per character, must be exactly the same.
While LIKE
looks for "something like", that is, content that has searched text in a part of where (column (s)) you are looking for. Usually the %
symbol is used to indicate where you can have wildcard characters, where you can have anything else.
The use of '1kvsg4oracxq%' still usually allows the use of an index, but in any other logar it can prevent the indexed consumption and have poor performance, or even tragic (depends, has to measure, not always bad) . In these cases use a inverted index for full text search may be more appropriate.
The _
is also used for only one wildcard character. Some syntaxes allow other ways to express what you can use.
Without %
the result is to be the same. But there is one exception, which is about the space at the end. =
normally ignores them. If you do not use %
in LIKE
, they will not be ignored.