1:以字段開頭模糊查詢的like的方法查詢
select * from t where t.user_code like 'A%'
2:以字段開頭模糊查詢的left(字段,長度)的方法查詢
select * from t where left(t.user_code, 1)='A';
3:字符間隔查詢段對應的值以 1,4,6 的格式查詢使用find_in_set
select * from t where FIND_IN_SET('1',t.name);//t.name所查詢的字段,所有包含1的數據
---------------------
作者:彼岸_夢
來源:CSDN
原文:https://blog.csdn.net/zhanxiaochu/article/details/81381627
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!