Write a mysql statement to retrieve name beginning with 'm'
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Solution
To apply extended regular expression, REGEXP operator is used with pattern matching characters.
To find names beginning with 'm', use ^ to match the beginning of the name. It returns 1 if the string expr matches the regular expression specified by the pattern 'm', 0 otherwise.
Output of the above statement -
need an explanation for this answer? contact us directly to get an explanation for this answer+----+--------------+------------+------------+ | id | name | department | birth | +----+--------------+------------+------------+ | 1 | Maria Gloria | CS | 1994-03-12 | | 6 | Maria Gaga | EC | 1993-10-09 | +----+--------------+------------+------------+