I want to Store in mydatabase time with millseconds. Is it Possible to Store this in Oracle? Upto My knowledge i know that the Date Datatype will store Hours,Minutes and seconds.
You can use DBMS_UTILITY.GET_TIME but have in mind that it is not syncronized with SYSDATE. The time you get (a number) is the number of 100th's of a second from some arbitrary epoch.
In 9i, there are new time formats, one of them is TIMESTAMP it shows the miliseconds even with precision of 9, default is 6.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
With the Partitioning option
JServer Release 8.1.7.2.0 - Production
SQL> alter session set events '10406 trace name context forever';
Session altered.
SQL> create table a (kk timestamp);
Table created.
SQL> insert into a values(sysdate);
1 row created.
SQL> select * from a;
KK
---------------------------------------------------------------------------
17-JAN-02 11.38.54 AM
True, this event enables you to store timestamp dataype values and use timestamp related functions inside 8i, but don't be fooled by this semi-feature! For example, it alows you to use SYSTIMESTAMP as Julian has pointed out, but make some tests with SYSTIMESTAMP inserts and see what fractional seconds are realy stored! Definitely not something that has anything to do with miliseconds or system clock! :(
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Bookmarks