如果你数字都对等的话。直接BETWEEN AND 就成 ------其他解决方案-------------------- where @ip between startIP and endIP ------其他解决方案-------------------- ip地址格式为:11.111.111.111
startIP:11.111.111.010
endIP: 11.111.111.020
判断的ip为:11.111.111.013,判断此ip是否在11.111.111.010与11.111.111.020
之间