0

I am using the following query

SELECT * FROM xnwu4_shows WHERE show_name REGEXP '^(0-9)'

it gives a empty result but according to mysql mannual used function is correct and should be gives some result because my database table have type (Regular Expression, string started with a numeric value or any number) of data.

Give me any idea to resolve above problem

1
  • 2
    Please return to some of your earlier questions and mark answers accepted where appropriate and correct. You are more likely to get more and swifter help here in the future if you do. Commented Jan 13, 2012 at 16:09

1 Answer 1

3

I think you want [] instead of ()

SELECT * FROM xnwu4_shows WHERE show_name REGEXP '^[0-9]'

This assumes you are attempting to match a digit 0-9 at the beginning of the string, rather than the literal string '0-9', which is what is being matched by (0-9) in parentheses.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.