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
TINYINT UNSIGNED (UByte)
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The TINYINT UNSIGNED
data type represents an unsigned, 8 bit integer, or org.jooq.types.UByte
in Java. It has no representation in JDBC.
If unsigned support is unavailable in a dialect, jOOQ will just map the type to the next higher integer type SMALLINT UNSIGNED (UShort).
createTable("t").column("c", TINYINTUNSIGNED)
Translates to the following dialect specific expressions:
Access, Hana, SQLDataWarehouse, SQLServer
CREATE TABLE t ( c tinyint )
ASE, Sybase
CREATE TABLE t ( c tinyint NULL )
Aurora MySQL, BigQuery, DB2, Informix, MariaDB, MemSQL, MySQL, Trino
CREATE TABLE t ( c tinyint unsigned )
Aurora Postgres, CockroachDB, Derby, Exasol, Firebird, H2, HSQLDB, Postgres, Redshift, SQLite, Teradata, Vertica, YugabyteDB
CREATE TABLE t ( c smallint )
ClickHouse
CREATE TABLE t ( c Nullable(UInt8) ) ENGINE Log()
Databricks
CREATE TABLE t ( c tinyint unsigned ) TBLPROPERTIES( 'delta.columnMapping.mode' = 'name', 'delta.feature.allowColumnDefaults' = 'supported' )
DuckDB
CREATE TABLE t ( c utinyint )
Oracle, Snowflake
CREATE TABLE t ( c number(3) )
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website
cast(field("c"), TINYINTUNSIGNED)
Translates to the following dialect specific expressions:
Access
cdec(c)
ASE, Hana, SQLDataWarehouse, SQLServer, Sybase
CAST(c AS tinyint)
Aurora MySQL, MariaDB, MemSQL, MySQL
CAST(c AS unsigned)
Aurora Postgres, CockroachDB, Derby, Exasol, Firebird, H2, HSQLDB, Postgres, Redshift, SQLite, Teradata, Vertica, YugabyteDB
CAST(c AS smallint)
BigQuery, DB2, Databricks, Informix, Trino
CAST(c AS tinyint unsigned)
ClickHouse
CAST(c AS Nullable(UInt8))
DuckDB
CAST(c AS utinyint)
Oracle, Snowflake
CAST(c AS number(3))
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!