Available in versions: Dev (3.22) | Latest (3.21) | 3.20 | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12

LOCALDATE (LocalDate)

Supported by ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

The LOCALDATE is a java.time bound variant of the DATE type, when the old JDBC binding should be avoided, i.e. java.time.LocalDate in Java, or Types.DATE in JDBC.

DDL support

Dialect support

This example using jOOQ:

createTable("t").column("c", LOCALDATE)

Translates to the following dialect specific expressions:

ASE, Sybase

CREATE TABLE t (
  c date NULL
)

Access

CREATE TABLE t (
  c datetime
)

Aurora MySQL, Aurora Postgres, BigQuery, CockroachDB, DB2, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Oracle, Postgres, Redshift, SQLDataWarehouse, SQLServer, SQLite, Snowflake, Spanner, Teradata, Trino, Vertica, YugabyteDB

CREATE TABLE t (
  c date
)

ClickHouse

CREATE TABLE t (
  c Nullable(date)
)
ENGINE Log()

Databricks

CREATE TABLE t (
  c date
)
TBLPROPERTIES (
  'delta.columnMapping.mode' = 'name',
  'delta.feature.allowColumnDefaults' = 'supported'
)
Generated with jOOQ 3.22. Support in older jOOQ versions may differ. Translate your own SQL on our website

Cast support

Dialect support

This example using jOOQ:

cast(field("c"), LOCALDATE)

Translates to the following dialect specific expressions:

ASE, Aurora MySQL, Aurora Postgres, BigQuery, CockroachDB, DB2, Databricks, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Oracle, Postgres, Redshift, SQLDataWarehouse, SQLServer, SQLite, Snowflake, Spanner, Sybase, Teradata, Trino, Vertica, YugabyteDB

cast(
  c
  AS date
)

Access

cstr(c)

ClickHouse

cast(
  c
  AS Nullable(date)
)
Generated with jOOQ 3.22. 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!

The jOOQ Logo