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.
NVARCHAR (String)
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The NVARCHAR
data type represents a variable length "national" (unicode) string type, or java.lang.String
in Java, or Types.NVARCHAR
in JDBC.
Given the variable size characteristic, the NVARCHAR
type may or may not be accompanied by an explicit length flag. If absent, the default in most dialects is to set the maximum length available.
DDL support
Dialect support
This example using jOOQ:
createTable("t").column("c", NVARCHAR(16))
Translates to the following dialect specific expressions:
Access
CREATE TABLE t ( c text(16) )
ASE, Sybase
CREATE TABLE t ( c nvarchar(16) NULL )
Aurora MySQL, Aurora Postgres, CockroachDB, DB2, Derby, DuckDB, Firebird, HSQLDB, MariaDB, MemSQL, MySQL, Postgres, Redshift, Snowflake, Teradata, Trino, Vertica, YugabyteDB
CREATE TABLE t ( c varchar(16) )
BigQuery
CREATE TABLE t ( c string )
ClickHouse
CREATE TABLE t ( c Nullable(varchar(16)) ) ENGINE Log()
Databricks
CREATE TABLE t ( c varchar(16) ) TBLPROPERTIES( 'delta.columnMapping.mode' = 'name', 'delta.feature.allowColumnDefaults' = 'supported' )
Exasol, H2, Hana, Informix, SQLDataWarehouse, SQLServer, SQLite
CREATE TABLE t ( c nvarchar(16) )
Oracle
CREATE TABLE t ( c nvarchar2(16) )
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website
cast(field("c"), NVARCHAR(16))
Translates to the following dialect specific expressions:
Access
cstr(c)
ASE, Exasol, H2, Hana, Informix, SQLDataWarehouse, SQLServer, SQLite, Sybase
CAST(c AS nvarchar(16))
Aurora MySQL, MariaDB, MemSQL, MySQL
CAST(c AS char(16))
Aurora Postgres, CockroachDB, DB2, Databricks, Derby, DuckDB, Firebird, HSQLDB, Postgres, Redshift, Snowflake, Teradata, Trino, Vertica, YugabyteDB
CAST(c AS varchar(16))
BigQuery
CAST(c AS string)
ClickHouse
CAST(c AS Nullable(varchar(16)))
Oracle
CAST(c AS nvarchar2(16))
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!