SQL-J Language Reference
Page 108 of 121

TIME

TIME provides for storage of an hour-minutes-seconds-fractional-seconds value with six digits in the fractional-seconds part.

Syntax for Column Definition

TIME

Corresponding Compile-Time Java Type

java.sql.Time

JDBC Metadata Type (java.sql.Types)

TIME

Dates, times, and timestamps cannot be mixed with one another in expressions except with a CAST.

SQL-J is more permissive than SQL-92 in the values and formats it permits in date/time literals. Any value that is recognized by the java.sql.Date, java.sql.Time, or java.sql.Timestamp valueOf(String) method is permitted in a column of the corresponding SQL-J date/time data type.

Literal Syntax

TIME'HH:MM:SS[.FFFFFF']

TIME Literal Examples

TIME'15:09:02'
'15:09:02'