SQL大概如下
SELECT *
FROM   t1,
       t2 .. .. .
WHERE  t1.id = t2.id
AND    t3.xxx = t4.xxx(+);t3.xxx = t4.xxx(+)
在t4后面有一个 ‘+’ 号,听说这个好像是类似left join 一样的? 但是具体不清楚,请教下各位前辈 这个是什么意思

解决方案 »

  1.   

    不是类似,就是左外连接。
    返回左右2表所有符合t3.xxx = t4.xxx条件的记录,并且返回左边表(本例即t3)中其他所有不符合连接条件的记录。
      

  2.   

    是连接,不过最好还是用 left join这种
      

  3.   

    左连接
    右连接
    的老式写法.建议改为left join , right join
      

  4.   

    左外连接,右外连接  ,Oracle 不支持 全外连接! 建议lz先看看Oracle 入门基础  或者 sql语言大全
      

  5.   

    9i以前:
    --左联:
    select a.id,a.name,b.address from a,b
    where a.id=b.id(+)
    --右联:
    select a.id,a.name,b.address from a,b
    where a.id(+)=b.id
    --外联
    SELECT a.id,a.name,b.address
    FROM a,b
    WHERE a.id = b.id(+)
    UNION
    SELECT b.id,'' name,b.address
    FROM b
    WHERE NOT EXISTS (
    SELECT * FROM a
    WHERE a.id = b.id);
    在9i以上,已经开始支持SQL99标准,所以,以上语句可以写成:
    --默认内部联结:
    select a.id,a.name,b.address,c.subject
    from (a inner join b on a.id=b.id)
    inner join c on b.name = c.name
    where other_clause
    --左联
    select a.id,a.name,b.address
    from a left outer join b on a.id=b.id
    where other_clause
    --右联
    select a.id,a.name,b.address
    from a right outer join b on a.id=b.id
    where other_clause
    --外联
    select a.id,a.name,b.address
    from a full outer join b on a.id=b.id
    where other_clause
    or
    select a.id,a.name,b.address
    from a full outer join b using (id)
    where other_clause