CURRENT_TIMESTAMP 함수
--------------------------------------------------------------------------------
【예제】
SQL> select current_timestamp, localtimestamp,
2 current_date from dual;
--------------------------------------------------------------------------------
session의 날짜와 시간 정보를 반환하는 함수
current_timestamp는 time zone까지 출력되지만,
localtimestamp는 time zone은 출력되지 않는다.
current_timestamp는 time zone까지 출력되지만,
localtimestamp는 time zone은 출력되지 않는다.
【예제】
SQL> select current_timestamp, localtimestamp,
2 current_date from dual;
CURRENT_TIMESTAMP
--------------------------------------------------------------------------
LOCALTIMESTAMP
--------------------------------------------------------------------------
CURRENT_D
---------
04-AUG-04 11.17.40.768776 AM +09:00
04-AUG-04 11.17.40.768776 AM
04-AUG-04
--------------------------------------------------------------------------
LOCALTIMESTAMP
--------------------------------------------------------------------------
CURRENT_D
---------
04-AUG-04 11.17.40.768776 AM +09:00
04-AUG-04 11.17.40.768776 AM
04-AUG-04
ps). select to_char(sysdate, 'yyyy-mm-dd hh:mi:ss) from dual
요건 밀리세컨드(ff)가 안나온다.
(X)select to_char(sysdate, 'yyyy-mm-dd hh:mi:ss.ff) from dual
'Oracle' 카테고리의 다른 글
DROP된 테이블, 테이블스페이스 FLASHBACK 기능으로 복구하기. (0) | 2011.05.04 |
---|---|
explain plan. plan table 생성 및 실행계획 확인법 (0) | 2011.04.27 |
자주 참조하는 DB dictionary (0) | 2010.07.02 |
HWM (0) | 2009.10.18 |
오라클 커넥션풀 만들기 (기본) (0) | 2009.10.18 |