2011-12-16 120 views

回答

13
SELECT FIELD1, FIELD2 FROM TABLE ORDER BY FIELD1 ASC, FIELD2 ASC 

這個SQL ORDER BY

+0

謝謝chris :) – 2011-12-16 10:54:38

2

是否

[rest of query] order by date, id 

工作?

3

一個很好的教程,試試這個(調整到您的需要):

SELECT * FROM table ORDER BY datecol ASC, id ASC 
3

這應該工作:

SELECT * FROM Table 
ORDER BY date, id; 
0

SELECT * FROM(SELECT *從表名按col1排序)按col2排序