- YEAR : -4712 ~ 9999 (0은 제외)
- MONTH : 01 ~ 12
- DAY : 01 ~ 31
- HOUR : 00 ~ 23
- MINUTE : 00 ~ 59
- SECOND : 00 ~ 59.9(N)
- TIMEZONE_HOUR : -12 ~ 14
- TIMEZONE_MINUTE : 00 ~ 99
insert into ts_test values ('2012-JAN-04', '12-01-04', '12-01-04');
insert into ts_test values ('2012-JAN-04', '12-01-04 13:01:11', '12-01-04 13:01:11');
insert into ts_test values ('2012-JAN-04', '12-01-04 13:01:11 +04:00', '12-01-04 13:01:11');
insert into ts_test values ('71-JAN-04', '1971-01-04 13:01:11.123456789 +04:00', '2071-01-04 13:01:11');
commit;
select * from ts_test;
alter session set nls_date_format = 'YYYY-MM-DD';
select * from ts_test;
alter session set nls_timestamp_format = 'YYYY-MM-DD HH24:MI:SS.FF';
alter session set nls_timestamp_tz_format = 'YYYY-MM-DD HH24:MI:SS.FF TZH:TZM';
select * from ts_test;
'Oracle > SQL Fundamentals II' 카테고리의 다른 글
14일차 # 5-20: INTERVAL fields (0) | 2012.04.23 |
---|---|
14일차 # 5-18: INTERVAL data types (0) | 2012.04.23 |
14일차 # 5-10: Timestamp Data Type (0) | 2012.04.23 |
14일차 # Datetime (0) | 2012.04.23 |
14일차 # 5-5: 세션의 현재 날짜 및 시간 관련함수들 (0) | 2012.04.23 |