我想从包含image_type
和priority
字段的表中检索记录。
喜欢
property id image_type priority
1 1 1
1 0 1
1 1 2
1 0 2
1 0 3
我想显示像所有图像类型记录一样的记录,并根据优先级顺序排列 ASC
或 DESC
。
最佳答案
SELECT
*
FROM
undefined_table_name
GROUP BY
image_type
ORDER BY
image_type ASC;
关于mysql - 使用 SQL 查询检索记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9479269/