表里面是什么样的ID整数吗?
数据集里substr和substring都可以用
select 订单ID,substr(订单ID,3,3) from 订单
SUBSTR(floor(订单ID),LENGTH(floor(订单ID))-2,3)
或者floor(订单ID)%1000