The followings are definition of DATE, TIME, and TIMESTAMP data type of SQL standard.
These are somewhat confusing to Java developers, because Date class of JDK represents a specific instant in time, with millisecond precision and there's no basic classes(except java.sql.Date, java.sql.Time which are restricted to JDBC) that represent pure date and pure time separately.
- DATE - contains the <datetime field>s YEAR, MONTH, and DAY;
- TIME - contains the <datetime field>s HOUR, MINUTE, and SECOND;
- TIMESTAMP - contains the <datetime field>s YEAR, MONTH, DAY, HOUR, MINUTE,
and SECOND.
The above definition is from SQL-92 standard draft which you can get from here.
0 comments:
Post a Comment