//查找所有分类及其父类SELECT s.type_id, s.type_name, p.type_name FROM 表1 AS s LEFT JOIN 表2 AS p ON s.parent_id= p.type_id;