I wonder if SQL LIKE is case sensitive?
The command LIKE
only compares string
according to a previous pattern. Who is responsible for the case (in) sensitive is collation
.
Is it possible to perform case insensitive search (if it is sensitive) using SQL LIKE?
Yes, depending only on the collation configured.
If you search for a name with an accent, can it identify that "Luis" is related to "Luis" and vice versa?
Yes, depending only on the collation configured.
As this answer on What is the difference between charset and collation in database? , understand what is collation :
Collation
Collation is the term used to define the set of rules that the
server will use for sorting and comparing between texts, or
either, as will the operation of the operators =, & gt ;, & lt ;, order by, etc.
For example, depending on the Collation configured, the system will
sort the 'ö' character between the 'o' and 'p' characters using another
collation, this character can be sorted in another position. Therefore
can conflict when making queries that relate tables with
different collations. In addition, the collation also defines whether the
system will differentiate accented characters or if it will be case
sensitive, for example the Latin1_General_CI_AS collation defines that the
system should treat the characters as case insensitive (CI) and
accentue sensitive (AS). Examples:
latin1_general_ci : There is no distinction between uppercase and
lowercase Searching for "test", records such as "Test" or "TEST"
will be returned.
latin1_general_cs : Distinguish between uppercase and
lowercase Searching for "test" will only return "test". options
such as "Test" and "TEST" will not be returned.
latin1_swedish_ci : No
distinguish upper and lower case letters and neither accented characters nor
with a cedilla, that is, the record containing the word "Intuition" will be
returned when there is a search for the word "int"