Oracle在select中写入子查询并限制唯一
select ta.*,
(select filed1
from (select row_number() over(partition by tt.fl_id order by tt.fd_date desc) fl_rn, tt.fl_id, filed1 from table_name2 tt) tf
where tf.fl_id = ta.fl_id
and fl_rn = 1
) filed1
from table_name ta
本文来自博客园,作者:无产铁锤,转载请注明原文链接:https://www.cnblogs.com/wzhsun/p/17238982.html

浙公网安备 33010602011771号