Available in versions: Dev (3.21) | Latest (3.20) | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11
LOCALTIME (LocalTime)
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The LOCALTIME
is a java.time
bound variant of the TIME type, when the old JDBC binding should be avoided, i.e. java.time.LocalTime
in Java, or Types.TIME
in JDBC.
DDL support
Dialect support
This example using jOOQ:
createTable("t").column("c", LOCALTIME)
Translates to the following dialect specific expressions:
Access, Informix, SQLite
CREATE TABLE t ( c datetime )
ASE, Sybase
CREATE TABLE t ( c time NULL )
Aurora MySQL, Aurora Postgres, BigQuery, CockroachDB, DB2, Derby, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, MariaDB, MemSQL, MySQL, Postgres, Redshift, SQLDataWarehouse, SQLServer, Snowflake, Teradata, Trino, Vertica, YugabyteDB
CREATE TABLE t ( c time )
ClickHouse
CREATE TABLE t ( c Nullable(Nullable(time)) ) ENGINE Log()
Databricks
CREATE TABLE t ( c time ) TBLPROPERTIES( 'delta.columnMapping.mode' = 'name', 'delta.feature.allowColumnDefaults' = 'supported' )
Oracle
CREATE TABLE t ( c timestamp )
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website
cast(field("c"), LOCALTIME)
Translates to the following dialect specific expressions:
Access
cstr(c)
ASE, Aurora MySQL, Aurora Postgres, BigQuery, CockroachDB, DB2, Databricks, Derby, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, MariaDB, MemSQL, MySQL, Postgres, Redshift, SQLDataWarehouse, SQLServer, Snowflake, Sybase, Teradata, Trino, Vertica, YugabyteDB
CAST(c AS time)
ClickHouse
CAST(c AS Nullable(Nullable(time)))
Informix
CAST(c AS datetime hour to second)
Oracle
CAST(c AS timestamp)
SQLite
CAST(c AS datetime)
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website
Feedback
Do you have any feedback about this page? We'd love to hear it!