am2
  • 2025-01-02自联接总结
    SELECTam2.*,am.midassubmid,am.menunameassubmenuname,am.urlassuburl,am.glyphiconassubglyphiconfromadmin_menuaminnerjoinadmin_menuam2onam.pid=am2.mid用父表pid(父级字段)到子表mid进行匹配,用父表数据进行逐行匹配1.表结