Insert data into timestamp column : Timestamp « SQL Data Types « Oracle PL/SQL Tutorial






SQL> create table myTable (
  2        event_date         date,
  3        event_timestamp timestamp );

Table created.

SQL>
SQL> insert into myTable( event_date, event_timestamp )
  2  values ( sysdate, sysdate );

1 row created.

SQL>
SQL> column event_date      format a18
SQL> column event_timestamp format a28
SQL>
SQL> select to_char(event_date, 'DD-MON-YY HH24:MI:SS') event_date, event_timestamp
  2  from myTable;


EVENT_DATE         EVENT_TIMESTAMP
------------------ ----------------------------
03-JUN-07 21:14:25 03-JUN-07 09.14.25.000000 PM

SQL> drop table myTable;

Table dropped.








10.12.Timestamp
10.12.1.Use timestamps
10.12.2.timestamp column
10.12.3.Insert data into timestamp column
10.12.4.Using the TIMESTAMP Type
10.12.5.Round a timestamp
10.12.6.Use timestamp in insert statement
10.12.7.TIMESTAMP literal supports Time Zone (as offset from UTC). Default is SESSION Timezone:
10.12.8.A normalization to DB timezone: