DATE and TIMESTAMP are the same size (7 bytes). These bytes are used to store eyelids, decades, years, months, days, hours, minutes and seconds. But TIMESTAMP allows you to store additional information, such as fractional seconds (11 bytes) and fractional seconds with a time zone (13 bytes).
TIMESTAMP was added as ANSI, compatible with Oracle. Before that, he had only DATE.
In general cases, you should use DATE. But if time accuracy is a requirement, use TIMESTAMP.
And about Java, the oracle.sql.DATE class from the Oracle JDBC driver provides conversions between the Oracle Date / Timestamp data type and the Java classes java.sql.Date, java.sql.Time, and java.sql.Timestamp.
Guillermo Luque 02 Oct '13 at 16:55 on 2013-10-02 16:55
source share