MySQL regex query case insensitive

后端 未结 4 833
天涯浪人
天涯浪人 2021-02-14 16:25

In my table I have firstname and last name. Few names are upper case ( ABRAHAM ), few names are lower case (abraham), few names are character starting with ucword (Abraham).

4条回答
  •  遇见更好的自我
    2021-02-14 17:23

    A few valid options already presented, but here's one more with just regex:

    SELECT * FROM `test_tbl` WHERE cus_name REGEXP '^[abcABC]';
    

提交回复
热议问题