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






SQL> create table myTable (
  2  starts  timestamp with local 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> alter session set time_zone = '-05:00'
  2
SQL> column starts format a30
SQL>
SQL> select starts from myTable;


STARTS
------------------------------
01-DEC-01 01.00.00.000000 PM
01-DEC-01 06.00.00.000000 PM
01-DEC-01 01.00.00.000000 PM

3 rows selected.

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