---
title: "mysql order by 根据 in 的顺序排序"
author: "freespace"
date: "2013-01-18T05:01:25Z"
tags: []
categories: ["数据库"]
slug: "mysql-order-by-in"
draft: false
lastmod: "2013-01-18T05:01:25Z"
id: 1771863
url: "https://freespace.iteye.com/blog/1771863"
---

使用关键字field

 

... IN(4, 5, 3, 1) ORDER BY FIELD(id, 4, 5, 3, 1)