SELECT column1,
column2,
FROM table
ORDER BY `table`.`column1` ASC
AND `table`.`column2` ASC
您不能像上面所写的那样执行此代码,但我想让column1显示1,2,3然后根据column1命令column2 1,2,3。你是怎么做到的?
column1 column2
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3
答案 0 :(得分:3)
您可以编写如下:column1在顺序中足够了:
Select column1, column2
from table
order by column1, column2