mysql - How does the Like operator behave with an empty argument (%%)? -
using like
operator
select first_name, last_name student_details first_name 's%';
will provide name start s.
but
select first_name, last_name student_details **first_name '%%';**
%%
- didn't have string constraints. query returning complete list.
how like %%
processed in sql?
can clarify this?
the %
sign considered zero-or-more repetition wildcard character in sql
. way works pretty same in other areas of computing, can have wide definition , explaination of how works putting in google.
that's why returns all entries in database, because matches if isn't repeated time (by way, same behavior you'll achieve like '%'
).
the 1 , 1 repetition wildcard in sql
represented _
.
Comments
Post a Comment