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
LONGNVARCHAR (String)
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The LONGNVARCHAR
data type represents a variable length "national" (unicode) string type, or java.lang.String
in Java, or Types.LONGNVARCHAR
in JDBC.
This data type is mostly offered as a compatibility type as the difference between this type and other variable length binary types like NVARCHAR (String) and NCLOB (String) is not very well defined.
DDL support
Dialect support
This example using jOOQ:
createTable("t").column("c", LONGNVARCHAR)
Translates to the following dialect specific expressions:
Access
CREATE TABLE t ( c longtext )
ASE
CREATE TABLE t ( c unitext NULL )
Aurora MySQL, MariaDB, MemSQL, MySQL
CREATE TABLE t ( c text )
Aurora Postgres, CockroachDB, DuckDB, Postgres, Redshift, Snowflake, Trino, YugabyteDB
CREATE TABLE t ( c varchar )
BigQuery
CREATE TABLE t ( c string )
ClickHouse
CREATE TABLE t ( c Nullable(String) ) ENGINE Log()
Databricks
CREATE TABLE t ( c string ) TBLPROPERTIES( 'delta.columnMapping.mode' = 'name', 'delta.feature.allowColumnDefaults' = 'supported' )
DB2, Informix
CREATE TABLE t ( c clob )
Derby, Vertica
CREATE TABLE t ( c long varchar )
Exasol, HSQLDB
CREATE TABLE t ( c longvarchar )
Firebird
CREATE TABLE t ( c blob sub_type text )
H2
CREATE TABLE t ( c longnvarchar )
Hana
CREATE TABLE t ( c nclob )
Oracle
CREATE TABLE t ( c nvarchar2(4000) )
SQLDataWarehouse
CREATE TABLE t ( c nvarchar(4000) )
SQLite
CREATE TABLE t ( c nvarchar )
SQLServer
CREATE TABLE t ( c nvarchar(max) )
Sybase
CREATE TABLE t ( c long nvarchar NULL )
Teradata
CREATE TABLE t ( c varchar(32000) )
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website
cast(field("c"), LONGNVARCHAR)
Translates to the following dialect specific expressions:
Access
cstr(c)
ASE
CAST(c AS unitext)
Aurora MySQL, MariaDB, MemSQL, MySQL
CAST(c AS char)
Aurora Postgres, CockroachDB, DuckDB, Postgres, Redshift, Snowflake, Trino, YugabyteDB
CAST(c AS varchar)
BigQuery, Databricks
CAST(c AS string)
ClickHouse
CAST(c AS Nullable(String))
DB2, Informix
CAST(c AS clob)
Derby, Vertica
CAST(c AS long varchar)
Exasol, HSQLDB
CAST(c AS longvarchar)
Firebird
CAST(c AS blob sub_type text)
H2
CAST(c AS longnvarchar)
Hana
CAST(c AS nclob)
Oracle
CAST(c AS nvarchar2(4000))
SQLDataWarehouse
CAST(c AS nvarchar(4000))
SQLite
CAST(c AS nvarchar)
SQLServer
CAST(c AS nvarchar(max))
Sybase
CAST(c AS long nvarchar)
Teradata
CAST(c AS varchar(32000))
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!