大侠,全行都相同才能合并,两行不同的合并了,不同的值取哪个?若是合并想同行,使用distinct,比如你的sql这样: select distinct(a.id),a.*, b.taname, c.tstname,e.deadname,d.tombdate, row_number() over (order by a.tid, a.taline, a.taposi ) as RN from t_tomb a , t_tomb_area b, t_pmt_tomb_status c , t_tomb_dead_use d ,t_dead e where a.taid = b.taid and a.tstid = c.tstid and d.tid = a.tid and d.deadid = e.deadid
select distinct(a.id),a.*, b.taname, c.tstname,e.deadname,d.tombdate,
row_number() over (order by a.tid, a.taline, a.taposi ) as RN from
t_tomb a , t_tomb_area b, t_pmt_tomb_status c , t_tomb_dead_use d ,t_dead e
where a.taid = b.taid and a.tstid = c.tstid and d.tid = a.tid and d.deadid = e.deadid