日期:2014-05-16 浏览次数:20658 次
select a.* from 表结构如下 a left join 表结构如下 b on a.nid=b.id order by IFNULL(b.id,a.id) , a.id ------解决方案-------------------- SELECT * FROM TTY A where nid=0union allselect nid,id,name from tty where nid>0order by id,nid