可以
外部联接分为左外部联接和右外部联接左外部联接
SELECT employee_id, manager_id 
   FROM employees
   WHERE employees.manager_id(+) = employees.employee_id;右外部联接
SELECT employee_id, manager_id 
   FROM employees
   WHERE employees.manager_id = employees.employee_id(+);

解决方案 »

  1.   

    这样就行:
    select * from table1 a ,table2 b where a.id=b.id(+)
    select * from table1 a ,table2 b where a.id(+)=b.id
      

  2.   

    好的,谢谢两位了,但我下面的语句好像不行哦,帮我看看、String sql = "SELECT * FROM students a, beds b WHERE a.student_code='996211026' AND trim(a.student_code(+)) = trim(b.student_code) ";好像得到的记录为0
      

  3.   

    说错了,是得到的记录数为0.
    可我明明在student表中是有该记录的,而在beds表中是没有学号为996211026的记录
      

  4.   

    如果是多个表呢?
    比如。b,c对a做左连接?
      

  5.   

    哦,我知道我错在哪了,应该是trim(a.student_code(+)) = trim(b.student_code(+)),结贴了