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
SMALLINT (Short)
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The SMALLINT
data type represents a signed, 16 bit integer, or java.lang.Short
in Java, or Types.SMALLINT
in JDBC
DDL support
Dialect support
This example using jOOQ:
createTable("t").column("c", SMALLINT)
Translates to the following dialect specific expressions:
Access, Aurora MySQL, Aurora Postgres, CockroachDB, DB2, Derby, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Postgres, Redshift, SQLDataWarehouse, SQLServer, SQLite, Teradata, Trino, Vertica, YugabyteDB
CREATE TABLE t ( c smallint )
ASE, Sybase
CREATE TABLE t ( c smallint NULL )
BigQuery
CREATE TABLE t ( c int64 )
ClickHouse
CREATE TABLE t ( c Nullable(smallint) ) ENGINE Log()
Databricks
CREATE TABLE t ( c smallint ) TBLPROPERTIES( 'delta.columnMapping.mode' = 'name', 'delta.feature.allowColumnDefaults' = 'supported' )
Oracle, Snowflake
CREATE TABLE t ( c number(5) )
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website
cast(field("c"), SMALLINT)
Translates to the following dialect specific expressions:
Access
cint(c)
ASE, Aurora Postgres, CockroachDB, DB2, Databricks, Derby, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, Informix, Postgres, Redshift, SQLDataWarehouse, SQLServer, SQLite, Sybase, Teradata, Trino, Vertica, YugabyteDB
CAST(c AS smallint)
Aurora MySQL, MariaDB, MemSQL, MySQL
CAST(c AS signed)
BigQuery
CAST(c AS int64)
ClickHouse
CAST(c AS Nullable(smallint))
Oracle, Snowflake
CAST(c AS number(5))
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!