gpt4 book ai didi

Mysql 按日期排序

转载 作者:行者123 更新时间:2023-11-29 14:55:15 24 4
gpt4 key购买 nike

我的表中有一个名为 date1 的日期字段。如果我使用以下查询。

 select * from schedule order by date1 asc

it gives the result like as jan 2011 comes before december 2010. but i need the december 2011 as the first row of the result.

最佳答案

将您的查询更改为

从计划中选择* ORDER BY date1 DESC

这应该可以解决问题。

詹姆斯

关于Mysql 按日期排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4780319/

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