如题,我的想法是先用截取,然后循环拼出来全部的字符串list,然后用in来做条件。觉得很笨拙,想知道有啥好办法
mysql的话
select * from t_user where nm > "1000" and nm < "1010"
如果包含两端,可以用between。
试一下
这两种都可以
select * from card where txt_card_code >= '10086' and txt_card_code <= '10089' select * from card where txt_card_code BETWEEN '10086' and '10089'