select * from tables where id in (2,3,1)
返回的数据是按id 1,2,3排序的,如果你希望返回的按照in给的顺序排序就需要用到order by field了
select * from tables where id in (2,3,1) ORDER BY field(id, 2, 3, 1)
-
Linux•2020-07-28• 622Views
mosquitto --用户配置 及权限管理
-
Linux•2020-07-28• 424Views
linux 下mqtt 安装
-
PHP•2019-12-16• 807Views
获取数组值的最大公约数
-
MYSQL•2019-12-16• 610Views
解决mysql---date不能为0, only_full_group_by 问题;
-
GIT•2019-06-20• 949Views
windows下 git 提示 CRLF问题