MySQL Programming Question:
Download Questions PDF

How To Use Regular Expression in Pattern Match Conditions?

Answer:

If you have a pattern that is too complex for LIKE to handle, you can use the regular expression pattern condition: REGEXP. The following tutorial exercise provides you some good examples:

SELECT 'GlobalGuideLine.com' REGEXP '.*ggl.*' FROM DUAL;
1

SELECT 'GlobalGuideLine.com' REGEXP '.*com$' FROM DUAL;
1

SELECT 'GlobalGuideLine.com' REGEXP '^F.*' FROM DUAL;
1


Download MySQL Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How To Use LIKE Conditions?How To Use CASE Expression?