Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1954

LIKE not working as expected (3 replies)

$
0
0
When searching for values containing a backslash, MySQL is not finding the rows as expected. Here's an example:

create table t (c varchar(50)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
insert into t values ('test\\test');
select * from t where c like '%\\\\test' escape '\\';

No rows are returned.

Changing the number of escaped backslashes in the "like" expression doesn't help. This is on MySQL 5.1.73 on RedHat.

Viewing all articles
Browse latest Browse all 1954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>