乐商商品分类 可按照SQL 同一个表、单表 联合查询 导出商品分类数据

来源:互联网 发布:ubuntu 串口调试工具 编辑:程序博客网 时间:2024/06/06 04:03


数据库实现语句

select c.id,c.parentid,c.title,d.title as '上级名称'
from (select id,parentid,title from nav a where exists(select * from nav b where b.id=a.parentid)) c,nav d
where d.id=c.parentid

0 0
原创粉丝点击