列
适用于 ✅ 开源版 ✅ 专业版 ✅ 企业版
所有表至少包含一列(PostgreSQL 中某些特殊情况除外),并且所有 SQL 方言都支持创建此类表
// Create a new table with a column create.createTable("table") .column("col1", INTEGER) .execute();
方言支持
此示例使用 jOOQ
createTable("table").column("col1", INTEGER)
翻译成以下特定方言的表达式
Access, DB2, Firebird, Hana, Informix, Teradata
CREATE TABLE table ( col1 integer )
ASE, Sybase
CREATE TABLE table ( col1 int NULL )
Aurora MySQL, Aurora Postgres, Derby, DuckDB, Exasol, H2, HSQLDB, MariaDB, MemSQL, MySQL, Postgres, Redshift, SQLDataWarehouse, SQLServer, SQLite, Trino, Vertica, YugabyteDB
CREATE TABLE table ( col1 int )
BigQuery
CREATE TABLE table ( col1 int64 )
ClickHouse
CREATE TABLE table ( col1 Nullable(integer) ) ENGINE Log()
CockroachDB
CREATE TABLE table ( col1 int4 )
Databricks
CREATE TABLE table ( col1 int ) TBLPROPERTIES( 'delta.columnMapping.mode' = 'name', 'delta.feature.allowColumnDefaults' = 'supported' )
Oracle, Snowflake
CREATE TABLE table ( col1 number(10) )
使用 jOOQ 3.21 生成。早期 jOOQ 版本的支持可能有所不同。 在我们的网站上翻译您自己的 SQL
反馈
您对此页面有任何反馈吗? 我们很乐意听取您的意见!