下面是SQL developepr给我的,在结果窗口和当我导出:
CREATION_TIME
-------------------
27-SEP-12
27-SEP-12
27-SEP-12
下面是运行相同的query/db的另一个软件:
CREATION_TIME
-------------------
2012-09-27 14:44:46
2012-09-27 14:44:27
2012-09-27 14:43:53
我如何让SQL开发人员返回时间太?
这样你就能得到小时、分和秒。您看。
select
to_char(CREATION_TIME,'RRRR') year,
to_char(CREATION_TIME,'MM') MONTH,
to_char(CREATION_TIME,'DD') DAY,
to_char(CREATION_TIME,'HH:MM:SS') TIME,
sum(bytes) Bytes
from
v$datafile
group by
to_char(CREATION_TIME,'RRRR'),
to_char(CREATION_TIME,'MM'),
to_char(CREATION_TIME,'DD'),
to_char(CREATION_TIME,'HH:MM:SS')
ORDER BY 1, 2;