无标题文章

INSERT INTO sys_role_menu(role_id, menu_id)

SELECT '9', '9' FROM DUAL WHERE NOT EXISTS(SELECT role_id,menu_id FROM sys_role_menu WHERE role_id = '9' and menu_id='9')

union all

SELECT '9', '11' FROM DUAL WHERE NOT EXISTS(SELECT role_id,menu_id FROM sys_role_menu WHERE role_id = '9' and menu_id='11')

你可能感兴趣的:(无标题文章)