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

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

 

SELECT T1.*, TT.BUTTONID, TT.NAME
FROM 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

 

posted @ 2014-11-09 18:38  沙耶  阅读(221)  评论(0编辑  收藏  举报