public interface CreateTableAsStep<R extends Record>
Query
that can create tables.
XYZ*Step
types directly from client code
It is usually not recommended to reference any XYZ*Step
types
directly from client code, or assign them to local variables. When writing
dynamic SQL, creating a statement's components dynamically, and passing them
to the DSL API statically is usually a better choice. See the manual's
section about dynamic SQL for details: https://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql.
Drawbacks of referencing the XYZ*Step
types directly:
Modifier and Type | Method and Description |
---|---|
CreateTableWithDataStep |
as(Select<? extends R> select)
Add an
AS clause to the CREATE TABLE statement. |
CreateTableColumnStep |
column(Field<?> field)
Add a column to the column list of the
CREATE TABLE
statement. |
<T> CreateTableColumnStep |
column(Field<T> field,
DataType<T> type)
Add a column to the column list of the
CREATE TABLE statement. |
CreateTableColumnStep |
column(Name field,
DataType<?> type)
Add a column to the column list of the
CREATE TABLE statement. |
CreateTableColumnStep |
column(String field,
DataType<?> type)
Add a column to the column list of the
CREATE TABLE statement. |
CreateTableColumnStep |
columns(Collection<? extends Field<?>> fields)
Add several columns to the column list of the
CREATE TABLE
statement. |
CreateTableColumnStep |
columns(Field<?>... fields)
Add several columns to the column list of the
CREATE TABLE
statement. |
@Support(value={ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,CUBRID,DB2,DERBY,H2,HANA,HSQLDB,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,TERADATA}) CreateTableWithDataStep as(Select<? extends R> select)
AS
clause to the CREATE TABLE
statement.@Support CreateTableColumnStep column(Field<?> field)
CREATE TABLE
statement.
This is the same as calling column(Field, DataType)
with
Field.getDataType()
as the argument data type.
@Support <T> CreateTableColumnStep column(Field<T> field, DataType<T> type)
CREATE TABLE
statement.@Support CreateTableColumnStep column(Name field, DataType<?> type)
CREATE TABLE
statement.@Support CreateTableColumnStep column(String field, DataType<?> type)
CREATE TABLE
statement.@Support CreateTableColumnStep columns(Field<?>... fields)
CREATE TABLE
statement.
This is the same as calling column(Field, DataType)
for each
column, with Field.getDataType()
as the argument data type.
@Support CreateTableColumnStep columns(Collection<? extends Field<?>> fields)
CREATE TABLE
statement.
This is the same as calling column(Field, DataType)
for each
column, with Field.getDataType()
as the argument data type.
Copyright © 2019. All rights reserved.