SELECT top_xuhao,top_order_id FROM top_order WHERE top_xuhao IN (SELECT DISTINCT top_xuhao FROM top_trade WHERE top_xuanzhong = 1) ORDER BY top_order_id,top_title SELECT top_xuhao,top_order_id FROM top_order WHERE top_xuhao IN (SELECT DISTINCT top_xuhao FROM top_trade WHERE top_xuanzhong = 1) ORDER BY top_title,top_order_id
经验总结:
Order By 多列排序 是以第一列为主列 先排序 如果第一列有相同的值 再按第二列 进行排序
W3cShool上也有说明:
http://www.w3school.com.cn/sql/sql_orderby.asp