日期:2014-05-17  浏览次数:20679 次

oracle左连接改成+的写法,出现ORA-01417错误
SQL code

FROM
          info2 info
          LEFT OUTER JOIN question_list ql
            ON info.enq_no = ql.enq_no
          LEFT OUTER JOIN choice_list cl
            ON info.enq_no = cl.enq_no
            AND ql.question_no = cl.question_no


改成

SQL code

from info2,question_list,choice_list
where
info.enq_no = ql.enq_no(+)
and info.enq_no = cl.enq_no(+)
AND ql.question_no = cl.question_no(+)


结果出现ORA-01417: a table may be outer joined to at most one other table错误,为什么?

------解决方案--------------------
你left outer join 最后一个是内连接,改写后就成了左连接
一个表左连接2个表,这个是不允许的。无法指定记录数以左连接的哪个表为准