-1

我有 mysql 表包含这样的数据:

[{"name":"50_4.jpg","title":"","description":""},   
{"name":"50_5.jpg","title":"","description":""},
{"name":"50_3.jpg","title":"","description":""},
{"name":"50_2.jpg","title":"","description":""},
{"name":"50_1.jpg","title":"","description":""}]

如何使其按图像名称按升序排序,如下所示

[{"name":"50_1.jpg","title":"","description":""},
{"name":"50_2.jpg","title":"","description":""},
{"name":"50_3.jpg","title":"","description":""},
{"name":"50_4.jpg","title":"","description":""},
{"name":"50_5.jpg","title":"","description":""}]

行中有不同数量的条目,图像名称有一些严格的命名约定

4

1 回答 1

0

使用以下查询获取结果

select * from tablename order by name asc;

于 2013-08-13T13:21:33.747 回答