'timestamp with time zone' type column : Timestamp Timezone « SQL Data Types « Oracle PL/SQL Tutorial






SQL> create table myTable (
  2  starts  timestamp with time zone );

Table created.

SQL>
SQL> insert into myTable (starts)
  2  values (TIMESTAMP '2001-12-01 15:00:00.000000 EST');

1 row created.

SQL>
SQL> insert into myTable (starts)
  2  values (TIMESTAMP '2001-12-01 17:00:00.000000 PST');

1 row created.

SQL>
SQL> insert into myTable (starts)
  2  values (TIMESTAMP '2001-12-01 20:00:00.000000 GMT');

1 row created.

SQL>
SQL> select dbtimezone from dual;


DBTIME
------
+00:00

SQL> select *
  2  from myTable
  3  where starts = TIMESTAMP '2001-12-01 15:00:00.000000 -5:00';


STARTS
------------------------------
01-DEC-01 03.00.00.000000 PM E
ST

01-DEC-01 08.00.00.000000 PM G
MT


SQL> drop table myTable;

Table dropped.

SQL>
SQL>








10.11.Timestamp Timezone
10.11.1.Using the TIMESTAMP WITH TIME ZONE Type
10.11.2.Add the time zone to your TIMESTAMP clause
10.11.3.Insert data to 'timestamp with time zone' type column
10.11.4.Use 'timestamp with time zone' type column in where clause
10.11.5.'timestamp with time zone' type column
10.11.6.'timestamp with local time zone' type column
10.11.7.Insert data into 'timestamp with local time zone' type column
10.11.8.Supply a time zone region
10.11.9.Using the TIMESTAMP WITH LOCAL TIME ZONE Type
10.11.10. Use 'TIMESTAMP(4) WITH LOCAL TIME ZONE' as column type