2011-01-24 155 views
0

我在我的表中有一個名爲date1的日期字段。如果我使用下面的查詢。Mysql按日期排序

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. 

回答

1

查詢更改爲

SELECT * FROM schedule ORDER BY date1 DESC

這應該做的伎倆。

James

0
select * from schedule order by date1 desc