to all guru
i have this sql statement select * from table where icon like ('icon1_%');
suppose it will only display icon1_anystring
unfortunately it also display icon10_anything icon11_anything and above
what is possible mistakes in the string?
select * from table where icon like 'icon1!_%' escape '!'
Note that the above query is the same as:
select * from table where icon like 'icon1\_%'
The problem is that '_' is a special character in LIKE searches - it is similar to a '.' in a regular expression (matches any single character).