gpt4 book ai didi

mysql - mysql按字段排序

转载 作者:行者123 更新时间:2023-11-30 23:23:47 26 4
gpt4 key购买 nike

SELECT id_emoticon, title, category 
FROM emoticons
WHERE id_emoticon IN (4, 4, 4, 4, 3)
ORDER BY id_emoticon DESC

我有这样的查询,我得到的结果只有一个 4 和一个 3 id。我需要我在 WHERE 子句中提供的所有 ID。

有什么想法吗?

最佳答案

我猜你想要 id_emoticon 4 后跟 3 的顺序,按 id_emoticon 的降序排列

如果是这种情况,请使用以下内容

SELECT id_emoticon, title, category 
FROM fe_emoticons
WHERE id_emoticon IN (4, 4, 4, 4, 3)
ORDER BY id_emoticon DESC

关于mysql - mysql按字段排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14314694/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com