I know you can use LIKE for a select statement to search for a string and then use wildcards to match that string.. ex:
Select * from table where first_name LIKE '%r%';
Would return names such as robert, roland, craig, etc.
I'm curious how you would search for an actual wildcard in the string such as the %:
Select * from table where values LIKE '% % %';
(the middle % being what you would be looking for) (obviously this is not the correct way to do it which is why I'm asking).
INSTR is another option but you cannot have an index which suits this comparison. Save this answer.
you cannot. where name like 'sasho' or name like 'shashi%' or name like 'rags'; the LIKE operation is not permitted to be used with IN.
There are two wildcards often used in conjunction with the LIKE operator: The percent sign (%) represents zero, one, or multiple characters. The underscore sign (_) represents one, single character.
How about
LIKE '%\%%' ESCAPE '\'
http://docs.oracle.com/cd/B12037_01/server.101/b10759/conditions016.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With