mysql使用BETWEEN进行字符串查询需要注意的地方?
查询出来的结果位数和查询条件的的位数不一致,一脸懵逼···
解决如上问题,sql需要加长度限制···
select sn from cc_card where company_id= 1 and sn BETWEEN "000000096" and "000010096" and length(sn)=9
查询出来的结果位数和查询条件的的位数不一致,一脸懵逼···
解决如上问题,sql需要加长度限制···
select sn from cc_card where company_id= 1 and sn BETWEEN "000000096" and "000010096" and length(sn)=9