Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / SQL Data Types
 

Using the TIMESTAMP Type

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.