select id,name,pid,path,CONCAT(path,‘-‘,id) as bpath from test ORDER BY bpath
mysql下的数据排序(concat)->无限极列表
原文:https://www.cnblogs.com/2019gdiceboy/p/12219900.html