按照字段in的列表进行排序

按照字段in的列表进行排序

select scan_value from scan_result where job_id = 17 and create_time = '2023-10-09 15:11:07' and resource in (
"10.61.96.82","10.47.64.181","10.44.29.124","10.44.29.125","10.61.96.64","10.73.4.21","10.127.160.152","10.127.160.153","10.127.160.154","10.127.160.155","10.127.56.151","10.127.96.154","10.127.96.155","10.127.96.156","10.127.208.161","10.127.208.168","10.95.0.143","10.95.0.146","10.95.0.147","10.95.0.148","10.95.0.151","10.95.0.153","10.95.0.154","10.143.216.192","10.143.216.196","10.143.64.120","10.126.160.130","10.79.160.32","10.44.0.185","10.73.4.204","10.77.68.201","10.95.185.102","10.93.3.85","10.47.77.22","10.95.0.174","10.109.167.22","10.61.96.74","10.61.96.75","10.127.96.197","10.141.65.147","10.126.160.126","10.73.98.151","10.94.0.156","10.61.192.152","10.63.224.69","10.63.224.70","10.63.224.51","10.63.224.56","10.63.224.57","10.63.224.59","10.63.224.62","10.63.224.64","10.63.224.65","10.63.224.67"
) 
ORDER BY FIELD(resource, "10.61.96.82","10.47.64.181","10.44.29.124","10.44.29.125","10.61.96.64","10.73.4.21","10.127.160.152","10.127.160.153","10.127.160.154","10.127.160.155","10.127.56.151","10.127.96.154","10.127.96.155","10.127.96.156","10.127.208.161","10.127.208.168","10.95.0.143","10.95.0.146","10.95.0.147","10.95.0.148","10.95.0.151","10.95.0.153","10.95.0.154","10.143.216.192","10.143.216.196","10.143.64.120","10.126.160.130","10.79.160.32","10.44.0.185","10.73.4.204","10.77.68.201","10.95.185.102","10.93.3.85","10.47.77.22","10.95.0.174","10.109.167.22","10.61.96.74","10.61.96.75","10.127.96.197","10.141.65.147","10.126.160.126","10.73.98.151","10.94.0.156","10.61.192.152","10.63.224.69","10.63.224.70","10.63.224.51","10.63.224.56","10.63.224.57","10.63.224.59","10.63.224.62","10.63.224.64","10.63.224.65","10.63.224.67") ;

posted @ 2023-10-09 16:00  SpecialSpeculator  阅读(8)  评论(0编辑  收藏  举报