472,098 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,098 software developers and data experts.

Query field for underscore string??

I have a field that contains an underscore. How can I do a query for
the underscore since I just found that underscore really doesn't find
underscore it is a wildcard in mysql. I need to be able to query for
the actual underscore. For example. Select Title where Title LIKE
'10_%' doesn't give me what I want.

Results

10_1
100_2
1000_4
10_2
etc..

Looking for Result "10_%"

10_1
10_2
10_3
Thanks

Sep 2 '06 #1
1 10946
Barkster wrote:
I have a field that contains an underscore. How can I do a query for
the underscore since I just found that underscore really doesn't find
underscore it is a wildcard in mysql.
You need to escape it

'10\_%'
Sep 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Jason Daly | last post: by
3 posts views Thread by John young | last post: by
6 posts views Thread by Martin Lacoste | last post: by
2 posts views Thread by Keith Wilby | last post: by
1 post views Thread by Intrepid_Yellow | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.