mysql将字符串转为数字

MySQL字符串+0即可转为数字:


 <!--查找版本是否满足区间-->
    <select id="isVersion"  resultType="java.lang.String" parameterType="map">
        SELECT version_id  from job_release_version
        where src_version+0<=#{version}+0 and tgt_version+0>=#{version}+0
        and  job_id=#{jobId}
        limit 1
    </select>

猜你喜欢

转载自blog.csdn.net/w_t_y_y/article/details/80213826
今日推荐