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.
CLOB (String)
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The CLOB
(Character Large OBject) data type represents a variable length string type, or java.lang.String
in Java, or Types.CLOB
in JDBC.
Some RDBMS support different variable size string types, where the CLOB
type allows for very big objects to be stored in separate storage. In those RDBMS, CLOB
may behave subtly differently from VARCHAR (String).
DDL support
Dialect support
This example using jOOQ:
createTable("t").column("c", CLOB)
Translates to the following dialect specific expressions:
Access
CREATE TABLE t ( c longtext )
ASE, Sybase
CREATE TABLE t ( c text NULL )
Aurora MySQL, Aurora Postgres, CockroachDB, Informix, MariaDB, MemSQL, MySQL, Postgres, Redshift, Snowflake, YugabyteDB
CREATE TABLE t ( c text )
BigQuery, DuckDB
CREATE TABLE t ( c string )
ClickHouse
CREATE TABLE t ( c Nullable(varchar) ) ENGINE Log()
Databricks
CREATE TABLE t ( c string ) TBLPROPERTIES( 'delta.columnMapping.mode' = 'name', 'delta.feature.allowColumnDefaults' = 'supported' )
DB2, Derby, Exasol, H2, HSQLDB, Hana, Oracle, SQLite, Teradata
CREATE TABLE t ( c clob )
Firebird
CREATE TABLE t ( c blob sub_type text )
SQLDataWarehouse, Trino
CREATE TABLE t ( c varchar )
SQLServer
CREATE TABLE t ( c varchar(max) )
Vertica
CREATE TABLE t ( c long varchar )
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website
cast(field("c"), CLOB)
Translates to the following dialect specific expressions:
Access
cstr(c)
ASE, Aurora Postgres, CockroachDB, Informix, Postgres, Redshift, Snowflake, Sybase, YugabyteDB
CAST(c AS text)
Aurora MySQL, MariaDB, MemSQL, MySQL
CAST(c AS char)
BigQuery, Databricks, DuckDB
CAST(c AS string)
ClickHouse
CAST(c AS Nullable(varchar))
DB2, Derby, Exasol, H2, HSQLDB, Hana, SQLite, Teradata
CAST(c AS clob)
Firebird
CAST(c AS blob sub_type text)
Oracle
to_clob(c)
SQLDataWarehouse, Trino
CAST(c AS varchar)
SQLServer
CAST(c AS varchar(max))
Vertica
CAST(c AS long varchar)
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!