|
- --hr
- select dbtimezone from dual;
- select sessiontimezone from dual;
- select to_timestamp('2010-01-10 12:00:00', 'YYYY-MM-DD HH24:MI:SS' ) from dual;
- create table t07110_a( a date, b timestamp,
- c timestamp with time zone, d timestamp with local time zone,location varchar2(20) );
- insert into t07110_a values(sysdate,sysdate,sysdate,sysdate,'Shanghai1');
- commit;
- select * from t07110_a;
- insert into t07110_a values(current_date,current_date,current_date,current_date,'Shanghai-2');
- commit;
- select * from t07110_a;
- --sys
- select * from dict_columns c where c.column_name like '%TZ%';
- select * from V$TIMEZONE_NAMES;
- --hr
- insert into t07110_a values(to_date('2010-01-10 15:02:00','YYYY-MM-DD HH24:MI:SS'),
- to_timestamp('2010-01-10 15:02:00','YYYY-MM-DD HH24:MI:SS'),
- to_timestamp_tz('2010-01-10 15:02:00 +0:0','YYYY-MM-DD HH24:MI:SS TZH:TZM'),
- to_timestamp_tz('2010-01-10 15:02:00 +0:0','YYYY-MM-DD HH24:MI:SS TZH:TZM'),
- 'Shanghai3');
- commit;
- select * from t07110_a;
- --sys
- alter database set time_zone='+08:00';
- select owner ,table_name from dba_tab_columns where data_type like '%LOCAL TIME ZONE';
- drop table oe.orders cascade constraints;
- drop table hr.t07110_a;
- purge dba_recyclebin;
- drop user APEX_040200 cascade;
- alter database set time_zone='+08:00';
- shutdown immediate
- startup
复制代码
|
|