MENU

mysql 根据条件排序

December 3, 2018 • Code

mysql 按in条件排序

SELECT * FROM `user` WHERE id in(5,3,2) order by field(id,5,3,2);

查询user表id为5,3,2的记录并且按照5,3,2的顺序排序!

Tags: None
Archives QR Code
QR Code for this page
Tipping QR Code
Comment Lists