Wednesday, May 11, 2011

sysdate vs systimestamp

In Oracle, the difference between sysdate and systimestamp is that

Sysdate is accurate to second.

Systimestamp is accurate to millisecond by default, and could be accurate to 1/1000 millisecond (Timestamp(9)).

It may make a big difference in a busy system. I had a project having batch uploading functions. The developer used sysdate for one timestamp column which was in a unique constraint. The sysdate caused a lot of problems. 

No comments:

Post a Comment