MySQL Programming Question: Download MySQL Programming PDF

How To Use Regular Expression in Pattern Match Conditions?

Tweet Share WhatsApp

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 PDF Read All 110 MySQL Programming Questions
Previous QuestionNext Question
How To Use LIKE Conditions?How To Use CASE Expression?