java and oracle fractional precision
I have created table in oracle and tried to insert fractional seconds precision 9 as one of the row eg.
insert into t values(to_timestamp('2011-07-08 10:02:02.999999777','yyyy-mm-dd hh24:mi:ss.FF9'));
it works.. but when I try to use current_timestamp
insert into t values(current_timestamp(9));
开发者_如何学运维08-JUL-11 04.06.58.603824000 PM. It only provides precision to 6 level. Is there any way to use 9 digit precision using oracle function. And side by side can java insert same level of precision?
Oracle relies on the operating system clock and different operating systems provide different levels of fractional second precision. Most Unix operating systems provide 6 digits of subsecond precision (microseconds). Windows generally only provides 3 (milliseconds). Oracle can only get 9 digits of precision (nanoseconds) if the underlying operating system clock has that level of accuracy. And there aren't many operating systems on the market that provide that level of accuracy.
精彩评论