MySQL regex query case insensitive

后端 未结 4 1641
星月不相逢
星月不相逢 2021-02-14 16:56

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:19

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

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

提交回复
热议问题