select * from (
select ROWNUM as num ,ff.* from (
select tt.* from abs_generl.sync_order_complete_log t left join abs_generl.sync_order_complete_log_cont tt
on t.id=tt.sync_order_complete_log_id where t.poord_package_num = '731A200720003406' and t.target = '731' order by T.id DESC ) ff ) hh
where num=1
select ROWNUM as num ,ff.* from (
select tt.* from abs_generl.sync_order_complete_log t left join abs_generl.sync_order_complete_log_cont tt
on t.id=tt.sync_order_complete_log_id where t.poord_package_num = '731A200720003406' order by T.id DESC ) ff
where ROWNUM<2
ROWNUM 可以使用< 但是在第一层的时候 无法世界使用=
但是在作为表的基表的时候可以使用=