09 MySQL Tutorial for Beginners: LIKE + REGEXP Operators, Regular Expressions



09 MySQL Tutorial for Beginners: LIKE + REGEXP Operators, Regular Expressions

09 MySQL Tutorial for Beginners: LIKE + REGEXP Operators, Regular Expressions

You use the LIKE operator to retrieve rows that match a string pattern. The Mask for a LIKE phrase can contain special symbols called “wildcards”. Masks aren’t case-sensitive.

In contrast to the LIKE operator, the REGEXP operator allows you to create complex string patterns known as regular expressions.
The mask for a REGEXP phrase can contain special characters and constructs like:
– the “caret” (^) symbol matches the pattern to the beginning of the value being tested.
– The “dollar sign” ($) symbol matches the pattern to the end of the value being tested.
– The “pipe” (|) symbol separates two string patterns and matches either one.
– “Square brackets” [] are used to specify multiple values.
lf you use the NOT keyword, only those rows with values that don’t match the string pattern are included in the result set.

EXERCISES for your SELF-TRAINING:
http://golearnfast.com/Quizzes.php?_SelectSmallerGroup_286=0&Lessons_ID=286

SCRIPT FOR THE EXAMPLES:
http://www.golearnfast.com/files/lessons_material/lesson_277_1440544998.sql

SUBSCRIBE!
https://www.youtube.com/channel/UCMEaGDoHU7c9tWyafZ9vC6Q?sub_confirmation=1

FACEBOOK
https://www.facebook.com/golearnfast

GOOGLE+
https://plus.google.com/u/0/b/101326338689489366802/

Comments are closed.