Available in versions: Dev (3.17) | Latest (3.16) | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10 | 3.9 | 3.8 | 3.7

Columns

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

All tables contain at least one column (except for some esoteric cases in PostgreSQL), and all SQL dialects support creating such tables:

// Create a new table with a column
create.createTable("table")
      .column("col1", INTEGER)
      .execute();

Dialect support

This example using jOOQ:

createTable("table").column("col1", INTEGER)

Translates to the following dialect specific expressions:

-- ACCESS, DB2, FIREBIRD, HANA, INFORMIX, TERADATA
CREATE TABLE table (
  col1 integer
)

-- ASE, SYBASE
CREATE TABLE table (
  col1 int NULL
)

-- AURORA_MYSQL, AURORA_POSTGRES, DERBY, EXASOL, H2, HSQLDB, MARIADB, MEMSQL, MYSQL, POSTGRES, REDSHIFT, SQLDATAWAREHOUSE, 
-- SQLSERVER, VERTICA, YUGABYTEDB
CREATE TABLE table (
  col1 int
)

-- BIGQUERY
CREATE TABLE table (
  col1 int64
)

-- COCKROACHDB
CREATE TABLE table (
  col1 int4
)

-- ORACLE, SNOWFLAKE
CREATE TABLE table (
  col1 number(10)
)

-- SQLITE
CREATE TABLE "table" (
  col1 int
)

(These are currently generated with jOOQ 3.17, see #10141), or translate your own on our website

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo