How to insert default time with milliseconds
936666Jul 3 2012 — edited Jul 3 2012How to insert default time with milliseconds
I tried with two ways but not able to insert millisecond
CASE:1
Command> create table Test (i int,h timestamp default TO_CHAR(SYSDATE, 'DD-MON-
YYYY HH:MI:SS:SSSSS'));
1001: Syntax error in SQL statement before or at: "(", character position: 53
... table Test (i int,h timestamp default TO_CHAR(SYSDATE, 'DD-MON-YY...
The command failed.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
CASE:2
Command> create table Test (i int,h timestamp default Sysdate );
Command> Insert into test values (1,TO_CHAR(SYSDATE, 'YYYY-MM-DD HH:MI:SS:SSSSS'));
2813: Error converting from character string '2012-07-03 10:58:56:395366' to Oracle timestamp
The command failed.
I need to insert the data with default time with milliseconds
Thanks!