How To Use Regular Expression in Pattern Match Conditions?
Submitted by: AdministratorIf 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
Submitted by: Administrator
SELECT 'GlobalGuideLine.com' REGEXP '.*ggl.*' FROM DUAL;
1
SELECT 'GlobalGuideLine.com' REGEXP '.*com$' FROM DUAL;
1
SELECT 'GlobalGuideLine.com' REGEXP '^F.*' FROM DUAL;
1
Submitted by: Administrator
Read Online MySQL Programming Job Interview Questions And Answers
Top MySQL Programming Questions
| ☺ | What Is TIMESTAMP in MySQL? |
| ☺ | How To Use Regular Expression in Pattern Match Conditions? |
| ☺ | What Is Union? |
| ☺ | How To Decrement Dates by 1 in MySQL? |
| ☺ | What Is Row? |
Top Databases Programming Categories
| ☺ | RDBMS Interview Questions. |
| ☺ | SQL Interview Questions. |
| ☺ | SSRS Interview Questions. |
| ☺ | Sybase Interview Questions. |
| ☺ | Database Administrator (DBA) Interview Questions. |
