用到的关键字:field order by field 比如项目中存在的例子: 例如: select software_id from software where status=1 and cd_client_flag=20 and software_code in <foreach item = "code" collection="codeList" separator="," open="(" close=")"> #{code} </foreach> order by field (software_code, <foreach item = "code" collection="codeList" separator=","> #{code} </foreach>)
mysql 循环查询in 按照参数顺序输出结果
最新推荐文章于 2022-08-21 11:18:03 发布