Wednesday, October 11, 2023

Database - Difference between oracle Date and Timestamp types

  • DATE and TIMESTAMP have the same size (7 bytes). Those bytes are used to store century, decade, year, month, day, hour, minute and seconds. But TIMESTAMP allows to store additional info such as fractional seconds (11 bytes) and fractional seconds with timezone (13 bytes).
  • TIMESTAMP was added as an ANSI compliant to Oracle. Before that, it had DATE only.
  • In general cases you should use DATE. But if precision in time is a requirement, use TIMESTAMP.




No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...