table1father son
------ ----
1 101
1 102
1 103
2 201
2 202
3 301
101 1011
101 1012
1011 10111
1011 10112我想利用一个查询语句进行排序,实现如下:
father son
------ ----
1 101
1 102
1 103
101 1011
101 1012
1011 10111
1011 10112
2 201
2 202
3 301
就是说先按照father 排序,再按照father对应的son排序,如何实现?
------ ----
1 101
1 102
1 103
2 201
2 202
3 301
101 1011
101 1012
1011 10111
1011 10112我想利用一个查询语句进行排序,实现如下:
father son
------ ----
1 101
1 102
1 103
101 1011
101 1012
1011 10111
1011 10112
2 201
2 202
3 301
就是说先按照father 排序,再按照father对应的son排序,如何实现?
father son
------ ----
1 101
101 1011
1011 10111
1011 10112
101 1012
1 102
1 103
2 201
2 202
3 301
FROM table1
ORDER BY son,father
table1father son
------ ----
1 501
1 502
1 503
2 201
2 202
3 701
501 5015
501 5016
5015 50151
5015 50152想要的结果:
father son
------ ----
1 501
501 5015
501 5016
5015 50151
5015 50152
1 502
1 503
2 201
2 202
3 701
father son
------ ----
1 101
101 1011
1011 10111
1011 10112
101 1012
1 102
1 103
2 201
2 202
3 301
与你这次说的
1 501
501 5015
501 5016
5015 50151
5015 50152
1 502
1 503
2 201
2 202
3 701
按照你这次的排序规则 101 1012 应该在 1011 10111 这行的上面啊