👇 MySQL 2 solutions | very easy 🔥 regexp | no like
\uD83D\uDE4B\uD83C\uDFFB\u200D\u2640\uFE0F Hello, here are my solutions to the problem.\n### Please upvote to motivate me post future solutions. HAPPY CODING \u
### \uD83D\uDE4B\uD83C\uDFFB\u200D\u2640\uFE0F Hello, here are my solutions to the problem.\n### Please upvote to motivate me post future solutions. HAPPY CODING \u2764\uFE0F\n##### Any suggestions and improvements are always welcome.\n##### Solution 1: regexp, \'\\\\b...\' \uD83C\uDFAF\n##### \u2705 Runtime: 536 ms, faster than 31.19% of MySQL\n```\nselect *\nfrom patients\nwhere conditions regexp \'\\\\bDIAB1\'\n```\n\\b - word boundary so it checks that it starts with that in the word\n\\ - extra slash so that mysql treats it as a special char.\n##### Solution 2: regexp, \'^...|[:space:]...\' \uD83C\uDFAF\n##### Logic is the same as `like \'DIAB1%\' or conditions like \'% DIAB1%\'` but works faster \uD83D\uDD25\n##### \u2705 Runtime: 275 ms, faster than 93.47% of MySQL \uD83D\uDD25\n```\nselect *\nfrom patients\nwhere conditions regexp \'^DIAB1|[:space:]DIAB1\'\n```\n##### https://regexr.com is useful for building your regex and try it with different test case. \uD83E\uDD37\uD83C\uDFFB\u200D\u2640\uFE0F\n##### If you like the solutions, please upvote \uD83D\uDD3C\n##### For any questions, or discussions, comment below. \uD83D\uDC47\uFE0F
['MySQL']