×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

刚刚发现这个SQL在MYSQL上居然能运行通过,当然结果错误...这不会是BUG吧?...

UPDATE
group_sub_menu
inner join group_main_menu
on group_main_menu.main_menu_id =   group_sub_menu.main_menu_id
and group_main_menu.group_id = group_sub_menu.group_id
inner join
(
SELECT distinct group_id
FROM group_member
inner join employee
on group_member.member_id = employee.id
where logon_id = ?
) grp
on grp.group_id = group_main_menu.group_id

SET category_id = ?
and group_sub_menu.main_menu_id = ?

where group_sub_menu.main_menu_id = ?
and group_sub_menu.sub_menu_id = ?
Report

Replies, comments and Discussions:

  • 工作学习 / 学科技术讨论 / 刚刚发现这个SQL在MYSQL上居然能运行通过,当然结果错误...这不会是BUG吧?...
    UPDATE
    group_sub_menu
    inner join group_main_menu
    on group_main_menu.main_menu_id =   group_sub_menu.main_menu_id
    and group_main_menu.group_id = group_sub_menu.group_id
    inner join
    (
    SELECT distinct group_id
    FROM group_member
    inner join employee
    on group_member.member_id = employee.id
    where logon_id = ?
    ) grp
    on grp.group_id = group_main_menu.group_id

    SET category_id = ?
    and group_sub_menu.main_menu_id = ?

    where group_sub_menu.main_menu_id = ?
    and group_sub_menu.sub_menu_id = ?
    • NG应该从读MySQL source code 下手:)
      • 当然这个错误不难发现,,,,, 那它也得报错啊. 因为语法就不对. 有机会在ORACLE上试试.
        • 我感觉有的语法太高深会迫使ORACLE以解释方式运行?当然并非总这样。你试试EXPLAIN PLAN ?