select * from
table1 t1 ,
table2 t2
where
t1.id = t2.id(+)
and t2.seq = (select max(t3.seq) from table2 t3 where t3.id = t2.id)上面这样的写法对应用LEFT JOIN 的写法该如何写?
table1 t1 ,
table2 t2
where
t1.id = t2.id(+)
and t2.seq = (select max(t3.seq) from table2 t3 where t3.id = t2.id)上面这样的写法对应用LEFT JOIN 的写法该如何写?
table1 t1
left join t2 on t1.id=t2.id
and t2.seq = (select max(t3.seq) from table2 t3 where t3.id = t2.id)
select * from
table1 t1
left outer join table2 t2 on t1.id=t2.id
where t2.seq = (select max(t3.seq) from table2 t3 where t3.id = t2.id)
or t2.id is null
table1 t1
left join t2 on t1.id=t2.id
and t2.seq = (select max(t3.seq) from table2 t3 where t3.id = t2.id)
table1 t1
left join t2 on t1.id=t2.id
where t2.seq = (select max(t3.seq) from table2 t3 where t3.id = t2.id)