且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL正则表达式查询不区分大小写

更新时间:2023-02-15 17:59:13

我认为您应该查询数据库,以确保名称被降低,假设该名称是您希望找出的名称,并且在应用程序中, ve像'abraham'一样降低了它,现在您的查询应该像这样:

I think you should query your database making sure that the names are lowered, suppose that name is the name you whish to find out, and in your application you've lowered it like 'abraham', now your query should be like this:

SELECT * FROM `test_tbl` WHERE LOWER(cus_name) = name

由于我不知道您使用哪种语言,所以我只是放置了名称,但请确保将其降低,然后您应该检索亚伯拉罕,亚伯拉罕或任何名称的变体!

Since i dont know what language you use, I've just placed name, but make sure that this is lowered and you should retrieve Abraham, ABRAHAM or any variation of the name!

希望有帮助!