Liquibase® version 3.8.5 is now available! Get it for free.
2018 XML Announcement
News All Previous Posts >>

Subscribe for email updates

- and/or -

Change: ‘dropTable’

Drops an existing table

Available Attributes

NameDescription
cascadeConstraintsbooleanAdd the `CASCADE CONSTRAINTS` to the statement
catalogNameName of the catalog@ v3.0E.g. 'cat'
schemaNameName of the schemaE.g. 'public'
tableNameName of the table to dropE.g. 'person'
<changeSet author="liquibase-docs" id="dropTable-example">
    <dropTable cascadeConstraints="true"
            catalogName="cat"
            schemaName="public"
            tableName="person"/>
</changeSet>
changeSet:
  id: dropTable-example
  author: liquibase-docs
  changes:
  - dropTable:
      cascadeConstraints: true
      catalogName: cat
      schemaName: public
      tableName: person
{
  "changeSet": {
    "id": "dropTable-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "dropTable": {
          "cascadeConstraints": true,
          "catalogName": "cat",
          "schemaName": "public",
          "tableName": "person"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

DROP TABLE cat.person;

Database Support

DatabaseNotesAuto Rollback
DB2/LUWSupportedNo
DB2/zSupportedNo
DerbySupportedNo
FirebirdSupportedNo
H2SupportedNo
HyperSQLSupportedNo
INGRESSupportedNo
InformixSupportedNo
MariaDBSupportedNo
MySQLSupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerSupportedNo
SQLiteSupportedNo
SybaseSupportedNo
Sybase AnywhereSupportedNo