The underscores _
is to find occurrences in certain position of the string.
Let's suppose I want to search for all strings that start with my
.
LIKE 'my%'
They will return me records like: mySQL
, Myan
, Mylan
and etc.
Let's start from the example I wanted to search for my
but from the third position of the string.
LIKE '___my%'
They will return me records as hjjmy
, yuimy
, and so on.
It also has other pattern matching
for like such as \_
and even ESCAPE
.
Edit
Also to mark event locations.
As in the example:
SELECT 'David!' LIKE '_____';
It will have output 0 because I searched for strings that contains 5 occurrences, since David!
contains 6 occurrences.
If I use:
SELECT 'David!' LIKE '______';
Will have output 1
Already an expression:
SELECT 'David32' LIKE '_____';
It will confront if
17.09.2015 / 19:28