I have to search in database some name. If I write
LIKE '%Alex Maxim%' - success.
If I write:
LIKE '% Alex Maxim%' - null.
I think is from the first white spaces('% Al...').
How can I do this ?
I have to search in database some name. If I write
LIKE '%Alex Maxim%' - success.
If I write:
LIKE '% Alex Maxim%' - null.
I think is from the first white spaces('% Al...').
How can I do this ?
Remove whitespaces using TRIM() string function
LIKE CONCAT('%',TRIM(' Alex Maxim'),'%')
If you want to remove only leading whitespace then use LTRIM() function
LIKE CONCAT('%',LTRIM(' Alex Maxim'),'%')