gpt4 book ai didi

mysql - 使用 SQL 查询检索记录

转载 作者:行者123 更新时间:2023-11-29 00:48:36 25 4
gpt4 key购买 nike

我想从包含image_typepriority 字段的表中检索记录。

喜欢

property id image_type priority
1 1 1
1 0 1
1 1 2
1 0 2
1 0 3

我想显示像所有图像类型记录一样的记录,并根据优先级顺序排列 ASCDESC

最佳答案

SELECT 
*
FROM
undefined_table_name
GROUP BY
image_type
ORDER BY
image_type ASC;

关于mysql - 使用 SQL 查询检索记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9479269/

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