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
This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
INTERVAL YEAR TO MONTH (YearToMonth)
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The INTERVALYEARTOMONTH
data type represents a YEAR TO MONTH
interval, or org.jooq.types.YearToMonth
in Java. It has no representation in JDBC.
DDL support
Dialect support
This example using jOOQ:
createTable("t").column("c", INTERVALYEARTOMONTH)
Translates to the following dialect specific expressions:
Access, Aurora MySQL, Aurora Postgres, BigQuery, CockroachDB, DB2, Derby, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Oracle, Postgres, Redshift, SQLDataWarehouse, SQLServer, SQLite, Snowflake, Teradata, Trino, Vertica, YugabyteDB
CREATE TABLE t ( c interval year to month )
ASE, Sybase
CREATE TABLE t ( c interval year to month NULL )
ClickHouse
CREATE TABLE t ( c Nullable(interval year to month) ) ENGINE Log()
Databricks
CREATE TABLE t ( c interval year to month ) TBLPROPERTIES( 'delta.columnMapping.mode' = 'name', 'delta.feature.allowColumnDefaults' = 'supported' )
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website
cast(field("c"), INTERVALYEARTOMONTH)
Translates to the following dialect specific expressions:
Access
cdec(c)
ASE, Aurora MySQL, Aurora Postgres, BigQuery, CockroachDB, DB2, Databricks, Derby, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Oracle, Postgres, Redshift, SQLDataWarehouse, SQLServer, SQLite, Snowflake, Sybase, Teradata, Trino, Vertica, YugabyteDB
CAST(c AS interval year to month)
ClickHouse
CAST(c AS Nullable(interval year to month))
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!