ORDER BY FIND_IN_SET(id, '3,11,7,1')
要么
ORDER BY FIELD(id, 3, 11, 7, 1)
要么
ORDER BY CASE id WHEN 3 THEN 0 WHEN 11 THEN 1 WHEN 7 THEN 2 WHEN 1 THEN 3 ELSE 4 END
欢迎分享,转载请注明来源:内存溢出
ORDER BY FIND_IN_SET(id, '3,11,7,1')
要么
ORDER BY FIELD(id, 3, 11, 7, 1)
要么
ORDER BY CASE id WHEN 3 THEN 0 WHEN 11 THEN 1 WHEN 7 THEN 2 WHEN 1 THEN 3 ELSE 4 END
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)