首页 > 代码库 > 显示菜单项与按钮项的关联关系

显示菜单项与按钮项的关联关系

菜单id = 7的菜单项所拥有的按钮项

 

SELECT T1.*, TT.BUTTONID, TT.NAMEFROM TBBUTTON T1 LEFT JOIN (SELECT * FROM TBMENUBUTTON T2 LEFT JOIN TBMENU T3 ON T2.MENUID = T3.ID WHERE T3.ID = 7 ) TT ON T1.ID = TT.BUTTONID

 

显示菜单项与按钮项的关联关系