-
public interface AlterTableStep
The step in theALTER TABLE
statement where the action can be decided.Referencing
XYZ*Step
types directly from client codeIt 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:- They're operating on mutable implementations (as of jOOQ 3.x)
- They're less composable and not easy to get right when dynamic SQL gets complex
- They're less readable
- They might have binary incompatible changes between minor releases
- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AlterTableAddStep
add(String field, DataType<?> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.AlterTableAddStep
add(Collection<? extends FieldOrConstraint> fields)
Add anADD
clause with multiple columns or constraints to theALTER TABLE
statement.AlterTableUsingIndexStep
add(Constraint constraint)
Add anADD CONSTRAINT
clause to theALTER TABLE
statement.AlterTableAddStep
add(Field<?> field)
Add anADD COLUMN
clause to theALTER TABLE
statement.<T> AlterTableAddStep
add(Field<T> field, DataType<T> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.AlterTableAddStep
add(FieldOrConstraint... fields)
Add anADD
clause with multiple columns or constraints to theALTER TABLE
statement.AlterTableAddStep
add(Name field, DataType<?> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.AlterTableAddStep
addColumn(String field, DataType<?> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.AlterTableAddStep
addColumn(Field<?> field)
Add anADD COLUMN
clause to theALTER TABLE
statement.<T> AlterTableAddStep
addColumn(Field<T> field, DataType<T> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.AlterTableAddStep
addColumn(Name field, DataType<?> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.AlterTableAddStep
addColumnIfNotExists(String field, DataType<?> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.AlterTableAddStep
addColumnIfNotExists(Field<?> field)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.<T> AlterTableAddStep
addColumnIfNotExists(Field<T> field, DataType<T> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.AlterTableAddStep
addColumnIfNotExists(Name field, DataType<?> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.AlterTableAddStep
addIfNotExists(String field, DataType<?> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.AlterTableAddStep
addIfNotExists(Field<?> field)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.<T> AlterTableAddStep
addIfNotExists(Field<T> field, DataType<T> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.AlterTableAddStep
addIfNotExists(Name field, DataType<?> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.AlterTableAlterStep<Object>
alter(String field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.AlterTableAlterConstraintStep
alter(Constraint constraint)
Add anALTER CONSTRAINT
clause to theALTER TABLE
statement.<T> AlterTableAlterStep<T>
alter(Field<T> field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.AlterTableAlterStep<Object>
alter(Name field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.AlterTableAlterStep<Object>
alterColumn(String field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.<T> AlterTableAlterStep<T>
alterColumn(Field<T> field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.AlterTableAlterStep<Object>
alterColumn(Name field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.AlterTableAlterConstraintStep
alterConstraint(String constraint)
Add anALTER CONSTRAINT
clause to theALTER TABLE
statement.AlterTableAlterConstraintStep
alterConstraint(Constraint constraint)
Add anALTER CONSTRAINT
clause to theALTER TABLE
statement.AlterTableAlterConstraintStep
alterConstraint(Name constraint)
Add anALTER CONSTRAINT
clause to theALTER TABLE
statement.AlterTableFinalStep
comment(String comment)
Specify a comment for a table using MySQL's syntax.AlterTableFinalStep
comment(Comment comment)
Specify a comment for a table using MySQL's syntax.AlterTableDropStep
drop(String field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
drop(String... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
drop(Collection<? extends Field<?>> fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
drop(Constraint constraint)
Add aDROP CONSTRAINT
clause to theALTER TABLE
statement.AlterTableDropStep
drop(Field<?> field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
drop(Field<?>... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
drop(Name field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
drop(Name... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumn(String field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumn(Field<?> field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumn(Name field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumnIfExists(String field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumnIfExists(Field<?> field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumnIfExists(Name field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumns(String... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumns(Collection<? extends Field<?>> fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumns(Field<?>... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
dropColumns(Name... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.AlterTableDropStep
dropConstraint(String constraint)
Add aDROP CONSTRAINT
clause to theALTER TABLE
statement.AlterTableDropStep
dropConstraint(Constraint constraint)
Add aDROP CONSTRAINT
clause to theALTER TABLE
statement.AlterTableDropStep
dropConstraint(Name constraint)
Add aDROP CONSTRAINT
clause to theALTER TABLE
statement.AlterTableDropStep
dropConstraintIfExists(String constraint)
Add aDROP CONSTRAINT IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropConstraintIfExists(Constraint constraint)
Add aDROP CONSTRAINT IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropConstraintIfExists(Name constraint)
Add aDROP CONSTRAINT IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropForeignKey(String constraint)
Add aDROP FOREIGN KEY
clause to theALTER TABLE
statement.AlterTableDropStep
dropForeignKey(Constraint constraint)
Add aDROP FOREIGN KEY
clause to theALTER TABLE
statement.AlterTableDropStep
dropForeignKey(Name constraint)
Add aDROP FOREIGN KEY
clause to theALTER TABLE
statement.AlterTableDropStep
dropIfExists(String field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropIfExists(Constraint constraint)
Add aDROP CONSTRAINT IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropIfExists(Field<?> field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropIfExists(Name field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.AlterTableDropStep
dropPrimaryKey()
Add aDROP PRIMARY KEY
clause to theALTER TABLE
statement.AlterTableDropStep
dropPrimaryKey(String constraint)
Add aDROP PRIMARY KEY
clause to theALTER TABLE
statement.AlterTableDropStep
dropPrimaryKey(Constraint constraint)
Add aDROP PRIMARY KEY
clause to theALTER TABLE
statement.AlterTableDropStep
dropPrimaryKey(Name constraint)
Add aDROP PRIMARY KEY
clause to theALTER TABLE
statement.AlterTableDropStep
dropUnique(String constraint)
Add aDROP UNIQUE
clause to theALTER TABLE
statement.AlterTableDropStep
dropUnique(Constraint constraint)
Add aDROP UNIQUE
clause to theALTER TABLE
statement.AlterTableDropStep
dropUnique(Name constraint)
Add aDROP UNIQUE
clause to theALTER TABLE
statement.AlterTableRenameColumnToStep
renameColumn(String oldName)
Add aRENAME COLUMN
clause to theALTER TABLE
statement.AlterTableRenameColumnToStep
renameColumn(Field<?> oldName)
Add aRENAME COLUMN
clause to theALTER TABLE
statement.AlterTableRenameColumnToStep
renameColumn(Name oldName)
Add aRENAME COLUMN
clause to theALTER TABLE
statement.AlterTableRenameConstraintToStep
renameConstraint(String oldName)
Add aRENAME CONSTRAINT
clause to theALTER TABLE
statement.AlterTableRenameConstraintToStep
renameConstraint(Constraint oldName)
Add aRENAME CONSTRAINT
clause to theALTER TABLE
statement.AlterTableRenameConstraintToStep
renameConstraint(Name oldName)
Add aRENAME CONSTRAINT
clause to theALTER TABLE
statement.AlterTableRenameIndexToStep
renameIndex(String oldName)
Add aRENAME INDEX
clause to theALTER TABLE
statement.AlterTableRenameIndexToStep
renameIndex(Index oldName)
Add aRENAME INDEX
clause to theALTER TABLE
statement.AlterTableRenameIndexToStep
renameIndex(Name oldName)
Add aRENAME INDEX
clause to theALTER TABLE
statement.AlterTableFinalStep
renameTo(String newName)
Add aRENAME TO
clause to theALTER TABLE
statement.AlterTableFinalStep
renameTo(Name newName)
Add aRENAME TO
clause to theALTER TABLE
statement.AlterTableFinalStep
renameTo(Table<?> newName)
Add aRENAME TO
clause to theALTER TABLE
statement.
-
-
-
Method Detail
-
comment
@Support({AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,HSQLDB,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA,VERTICA}) AlterTableFinalStep comment(String comment)
Specify a comment for a table using MySQL's syntax.
-
comment
@Support({AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,HSQLDB,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA,VERTICA}) AlterTableFinalStep comment(Comment comment)
Specify a comment for a table using MySQL's syntax.
-
renameTo
@Support AlterTableFinalStep renameTo(Table<?> newName)
Add aRENAME TO
clause to theALTER TABLE
statement.
-
renameTo
@Support AlterTableFinalStep renameTo(Name newName)
Add aRENAME TO
clause to theALTER TABLE
statement.
-
renameTo
@Support AlterTableFinalStep renameTo(String newName)
Add aRENAME TO
clause to theALTER TABLE
statement.
-
renameColumn
@Support AlterTableRenameColumnToStep renameColumn(Field<?> oldName)
Add aRENAME COLUMN
clause to theALTER TABLE
statement.
-
renameColumn
@Support AlterTableRenameColumnToStep renameColumn(Name oldName)
Add aRENAME COLUMN
clause to theALTER TABLE
statement.
-
renameColumn
@Support AlterTableRenameColumnToStep renameColumn(String oldName)
Add aRENAME COLUMN
clause to theALTER TABLE
statement.
-
renameIndex
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,DERBY,H2,HSQLDB,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER2016}) AlterTableRenameIndexToStep renameIndex(Name oldName)
Add aRENAME INDEX
clause to theALTER TABLE
statement.
-
renameIndex
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,DERBY,H2,HSQLDB,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER2016}) AlterTableRenameIndexToStep renameIndex(Index oldName)
Add aRENAME INDEX
clause to theALTER TABLE
statement.
-
renameIndex
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,DERBY,H2,HSQLDB,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER2016}) AlterTableRenameIndexToStep renameIndex(String oldName)
Add aRENAME INDEX
clause to theALTER TABLE
statement.
-
renameConstraint
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableRenameConstraintToStep renameConstraint(Constraint oldName)
Add aRENAME CONSTRAINT
clause to theALTER TABLE
statement.
-
renameConstraint
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableRenameConstraintToStep renameConstraint(Name oldName)
Add aRENAME CONSTRAINT
clause to theALTER TABLE
statement.
-
renameConstraint
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableRenameConstraintToStep renameConstraint(String oldName)
Add aRENAME CONSTRAINT
clause to theALTER TABLE
statement.
-
alter
@Support({DB2,ORACLE}) @Pro AlterTableAlterConstraintStep alter(Constraint constraint)
Add anALTER CONSTRAINT
clause to theALTER TABLE
statement.This is an alias for
alterConstraint(Constraint)
.
-
alter
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,VERTICA}) <T> AlterTableAlterStep<T> alter(Field<T> field)
-
alter
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,VERTICA}) AlterTableAlterStep<Object> alter(Name field)
-
alter
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,VERTICA}) AlterTableAlterStep<Object> alter(String field)
-
alterColumn
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,VERTICA}) <T> AlterTableAlterStep<T> alterColumn(Field<T> field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.
-
alterColumn
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,VERTICA}) AlterTableAlterStep<Object> alterColumn(Name field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.
-
alterColumn
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,VERTICA}) AlterTableAlterStep<Object> alterColumn(String field)
Add anALTER COLUMN
clause to theALTER TABLE
statement.
-
alterConstraint
@Support({DB2,ORACLE}) @Pro AlterTableAlterConstraintStep alterConstraint(Constraint constraint)
Add anALTER CONSTRAINT
clause to theALTER TABLE
statement.
-
alterConstraint
@Support({DB2,ORACLE}) @Pro AlterTableAlterConstraintStep alterConstraint(Name constraint)
Add anALTER CONSTRAINT
clause to theALTER TABLE
statement.
-
alterConstraint
@Support({DB2,ORACLE}) @Pro AlterTableAlterConstraintStep alterConstraint(String constraint)
Add anALTER CONSTRAINT
clause to theALTER TABLE
statement.
-
add
@Support AlterTableAddStep add(Field<?> field)
-
add
@Support({AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableAddStep add(FieldOrConstraint... fields)
Add anADD
clause with multiple columns or constraints to theALTER TABLE
statement.
-
add
@Support({AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableAddStep add(Collection<? extends FieldOrConstraint> fields)
Add anADD
clause with multiple columns or constraints to theALTER TABLE
statement.
-
add
@Support <T> AlterTableAddStep add(Field<T> field, DataType<T> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.This is an alias for
addColumn(Field, DataType)
.
-
add
@Support AlterTableAddStep add(Name field, DataType<?> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.This is an alias for
addColumn(Name, DataType)
.
-
add
@Support AlterTableAddStep add(String field, DataType<?> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.This is an alias for
addColumn(String, DataType)
.
-
addIfNotExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableAddStep addIfNotExists(Field<?> field)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.This is an alias for
addColumnIfNotExists(Field)
.
-
addIfNotExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) <T> AlterTableAddStep addIfNotExists(Field<T> field, DataType<T> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.This is an alias for
addColumnIfNotExists(Field, DataType)
.
-
addIfNotExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableAddStep addIfNotExists(Name field, DataType<?> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.This is an alias for
addColumnIfNotExists(Name, DataType)
.
-
addIfNotExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableAddStep addIfNotExists(String field, DataType<?> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.This is an alias for
addColumnIfNotExists(String, DataType)
.
-
addColumn
@Support AlterTableAddStep addColumn(Field<?> field)
Add anADD COLUMN
clause to theALTER TABLE
statement.
-
addColumn
@Support <T> AlterTableAddStep addColumn(Field<T> field, DataType<T> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.
-
addColumn
@Support AlterTableAddStep addColumn(Name field, DataType<?> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.
-
addColumn
@Support AlterTableAddStep addColumn(String field, DataType<?> type)
Add anADD COLUMN
clause to theALTER TABLE
statement.
-
addColumnIfNotExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableAddStep addColumnIfNotExists(Field<?> field)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.
-
addColumnIfNotExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) <T> AlterTableAddStep addColumnIfNotExists(Field<T> field, DataType<T> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.
-
addColumnIfNotExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableAddStep addColumnIfNotExists(Name field, DataType<?> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.
-
addColumnIfNotExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableAddStep addColumnIfNotExists(String field, DataType<?> type)
Add anADD COLUMN IF NOT EXISTS
clause to theALTER TABLE
statement.
-
add
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableUsingIndexStep add(Constraint constraint)
Add anADD CONSTRAINT
clause to theALTER TABLE
statement.
-
drop
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA}) AlterTableDropStep drop(Field<?> field)
-
drop
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA}) AlterTableDropStep drop(Name field)
-
drop
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA}) AlterTableDropStep drop(String field)
-
dropIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropIfExists(Field<?> field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.This is an alias for
dropColumnIfExists(Field)
.
-
dropIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropIfExists(Name field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.This is an alias for
dropColumnIfExists(Name)
.
-
dropIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropIfExists(String field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.This is an alias for
dropColumnIfExists(String)
.
-
dropColumn
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA}) AlterTableDropStep dropColumn(Field<?> field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.
-
dropColumn
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA}) AlterTableDropStep dropColumn(Name field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.
-
dropColumn
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA}) AlterTableDropStep dropColumn(String field)
Add anDROP COLUMN
clause to theALTER TABLE
statement.
-
dropColumnIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropColumnIfExists(Field<?> field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.
-
dropColumnIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropColumnIfExists(Name field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.
-
dropColumnIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,DB2,H2,MARIADB,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropColumnIfExists(String field)
Add anDROP COLUMN IF EXISTS
clause to theALTER TABLE
statement.
-
drop
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep drop(Field<?>... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.This is an alias for
dropColumns(Collection)
.
-
drop
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep drop(Name... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.This is an alias for
dropColumns(Collection)
.
-
drop
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep drop(String... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.This is an alias for
dropColumns(Collection)
.
-
dropColumns
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropColumns(Field<?>... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.
-
dropColumns
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropColumns(Name... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.
-
dropColumns
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropColumns(String... fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.
-
drop
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep drop(Collection<? extends Field<?>> fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.This is an alias for
dropColumns(Collection)
.
-
dropColumns
@Support({ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,H2,INFORMIX,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,TERADATA}) AlterTableDropStep dropColumns(Collection<? extends Field<?>> fields)
Add anDROP COLUMN
clause to theALTER TABLE
statement.
-
drop
@Support({ACCESS,ASE,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep drop(Constraint constraint)
Add aDROP CONSTRAINT
clause to theALTER TABLE
statement.
-
dropConstraint
@Support({ACCESS,ASE,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropConstraint(Constraint constraint)
Add aDROP CONSTRAINT
clause to theALTER TABLE
statement.- See Also:
DSL.constraint(String)
-
dropConstraint
@Support({ACCESS,ASE,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropConstraint(Name constraint)
Add aDROP CONSTRAINT
clause to theALTER TABLE
statement.- See Also:
DSL.constraint(String)
-
dropConstraint
@Support({ACCESS,ASE,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropConstraint(String constraint)
Add aDROP CONSTRAINT
clause to theALTER TABLE
statement.- See Also:
DSL.constraint(String)
-
dropIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,H2,POSTGRES}) AlterTableDropStep dropIfExists(Constraint constraint)
Add aDROP CONSTRAINT IF EXISTS
clause to theALTER TABLE
statement.
-
dropConstraintIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,H2,POSTGRES}) AlterTableDropStep dropConstraintIfExists(Constraint constraint)
Add aDROP CONSTRAINT IF EXISTS
clause to theALTER TABLE
statement.- See Also:
DSL.constraint(String)
-
dropConstraintIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,H2,POSTGRES}) AlterTableDropStep dropConstraintIfExists(Name constraint)
Add aDROP CONSTRAINT IF EXISTS
clause to theALTER TABLE
statement.- See Also:
DSL.constraint(String)
-
dropConstraintIfExists
@Support({AURORA_POSTGRES,COCKROACHDB,H2,POSTGRES}) AlterTableDropStep dropConstraintIfExists(String constraint)
Add aDROP CONSTRAINT IF EXISTS
clause to theALTER TABLE
statement.- See Also:
DSL.constraint(String)
-
dropPrimaryKey
@Support({AURORA_MYSQL,AURORA_POSTGRES,DERBY,H2,HSQLDB,MARIADB,MYSQL,POSTGRES}) AlterTableDropStep dropPrimaryKey()
Add aDROP PRIMARY KEY
clause to theALTER TABLE
statement.
-
dropPrimaryKey
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropPrimaryKey(Constraint constraint)
Add aDROP PRIMARY KEY
clause to theALTER TABLE
statement.Dialect families derived from MySQL do not know named constraints, in case of which this clause simply generates
DROP PRIMARY KEY
as indropPrimaryKey()
. In other dialect families, this produces aDROP CONSTRAINT [name]
clause, as indropConstraint(Constraint)
.
-
dropPrimaryKey
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropPrimaryKey(Name constraint)
Add aDROP PRIMARY KEY
clause to theALTER TABLE
statement.Dialect families derived from MySQL do not know named constraints, in case of which this clause simply generates
DROP PRIMARY KEY
as indropPrimaryKey()
. In other dialect families, this produces aDROP CONSTRAINT [name]
clause, as indropConstraint(Name)
.- See Also:
DSL.constraint(Name)
-
dropPrimaryKey
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropPrimaryKey(String constraint)
Add aDROP PRIMARY KEY
clause to theALTER TABLE
statement.Dialect families derived from MySQL do not know named constraints, in case of which this clause simply generates
DROP PRIMARY KEY
as indropPrimaryKey()
. In other dialect families, this produces aDROP CONSTRAINT [name]
clause, as indropConstraint(String)
.- See Also:
DSL.constraint(String)
-
dropUnique
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropUnique(Constraint constraint)
Add aDROP UNIQUE
clause to theALTER TABLE
statement.Some dialects (e.g.
SQLDialect.COCKROACHDB
) may not be able to drop constraints by name. If users specify the constraint type and the name, however, then the syntax can be emulated, e.g. usingDROP INDEX .. CASCADE
.
-
dropUnique
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropUnique(Name constraint)
Add aDROP UNIQUE
clause to theALTER TABLE
statement.Some dialects (e.g.
SQLDialect.COCKROACHDB
) may not be able to drop constraints by name. If users specify the constraint type and the name, however, then the syntax can be emulated, e.g. usingDROP INDEX .. CASCADE
.- See Also:
DSL.constraint(Name)
-
dropUnique
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropUnique(String constraint)
Add aDROP UNIQUE
clause to theALTER TABLE
statement.Some dialects (e.g.
SQLDialect.COCKROACHDB
) may not be able to drop constraints by name. If users specify the constraint type and the name, however, then the syntax can be emulated, e.g. usingDROP INDEX .. CASCADE
.- See Also:
DSL.constraint(String)
-
dropForeignKey
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropForeignKey(Constraint constraint)
Add aDROP FOREIGN KEY
clause to theALTER TABLE
statement.
-
dropForeignKey
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropForeignKey(Name constraint)
Add aDROP FOREIGN KEY
clause to theALTER TABLE
statement.- See Also:
DSL.constraint(Name)
-
dropForeignKey
@Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) AlterTableDropStep dropForeignKey(String constraint)
Add aDROP FOREIGN KEY
clause to theALTER TABLE
statement.- See Also:
DSL.constraint(String)
-
-