oracle怎么去重?怎么获取系统时间?
oracle怎么去重?怎么获取系统时间?selectt.*
from (
select a.*, row_number() over(partition by 需要分组的字段 order by 时间字段 desc) rw
from 表 a
where 条件
) t
where t.rw = 1 selectt.*
from (
select a.*, row_number() over(partition by 需要分组的字段 order by 时间字段 desc) rw
from 表 a
where 条件
) t
where t.rw = 1 distinct select sysdate from dual;
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
select to_char(sysdate,'yyyy-mm-dd hh24:mi') from dual; SYSDATE select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
页:
[1]