错误语句:
DELETE from sys_right_menu where right_id in (
SELECT m.right_id from sys_right_menu m
LEFT JOIN sys_right r on r.right_id=m.right_id
WHERE r.right_id is null
)
更正后:
DELETE from sys_right_menu where right_id in (
SELECT right_id from (
SELECT m.right_id from sys_right_menu m
LEFT JOIN sys_right r on r.right_id=m.right_id
WHERE r.right_id is null
) a
)