Reputation: 603
I have a table image with columns id
(number
), url
(varchar2(200)
).
Now I want to write a query to find all the urls which have character in it'%'. Does anyone how to write query for this?
Upvotes: 2
Views: 63
Reputation: 2101
Already answered, I'll throw my two cents in for another alternative:
where instr(url, '%') > 0
Upvotes: 1
Reputation: 2638
You can use 'LIKE' to search for a character in the URL field. The gotcha is that the percent is used as a wildcard when doing a string comparison. Do get around that functionality you need to escape the percent sign.
WHERE url LIKE '%\%%';
Upvotes: 1