Using the TIMESTAMP Type : Timestamp « SQL Data Types « Oracle PL/SQL Tutorial






Four digits may be stored to the right of the decimal point for the second.

SQL> CREATE TABLE mytimestamp (
  2    id INTEGER,
  3    made_on TIMESTAMP(4)
  4  );

Table created.

SQL>
SQL> INSERT INTO mytimestamp (id, made_on) VALUES (
  2    1, TIMESTAMP '2005-05-13 07:15:31.1234'
  3  );

1 row created.

SQL>
SQL> select * from mytimestamp;

        ID MADE_ON
---------- ---------------------------------------------------------------------------
         1 13-MAY-05 07.15.31.1234 AM

SQL>
SQL> drop table mytimestamp;

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: