Package org.h2.command.ddl

# Class AlterTable

java.lang.Object
org.h2.command.Prepared
org.h2.command.ddl.DefineCommand
org.h2.command.ddl.SchemaCommand
org.h2.command.ddl.AlterTable

Direct Known Subclasses:
  `AlterTableAddConstraint`, `AlterTableDropConstraint`, `AlterTableRename`, `AlterTableRenameColumn`, `AlterTableRenameConstraint`

public abstract class AlterTable extends SchemaCommand
The base class for ALTER TABLE commands.

## Field Summary

### Fields inherited from class org.h2.command.ddl.DefineCommand

`transactional`

### Fields inherited from class org.h2.command.Prepared

`create, parameters, prepareAlways, session, sqlStatement, sqlTokens`

## Method Summary

Modifier and Type
Method
Description
`final void`
`setIfTableExists(boolean b)`
`final void`
`setTableName(String tableName)`
`final long`
`update()`
Execute the statement.

### Methods inherited from class org.h2.command.ddl.SchemaCommand

`getSchema`

### Methods inherited from class org.h2.command.ddl.DefineCommand

`isReadOnly, isRetryable, isTransactional, queryMeta, setTransactional`

### Methods inherited from class org.h2.command.Prepared

`checkCanceled, checkParameters, collectDependencies, getCurrentRowNumber, getDatabase, getObjectId, getParameters, getPersistedObjectId, getPlanSQL, getPlanSQL, getSession, getSimpleSQL, getSQL, getSQLTokens, getType, isCacheable, isQuery, isWithParamValues, needRecompile, prepare, query, setCommand, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, setWithParamValues, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Method Details

### setTableName

public final void setTableName(String tableName)

### setIfTableExists

public final void setIfTableExists(boolean b)

### update

public final long update()
Description copied from class: `Prepared`
Execute the statement.

Overrides:
  `update` in class `Prepared`
Returns:
  the update count