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: ‘delete’

Deletes data from an existing table

Available Attributes

NameDescription
catalogNameName of the catalogE.g. 'cat'
schemaNameName of the schemaE.g. 'public'
tableNameName of the tableE.g. 'person'

Nested Properties

NameDescription
whereAllows to define the 'where' condition(s) stringE.g. 'name='Bob''
<changeSet author="liquibase-docs" id="delete-example">
    <delete catalogName="cat"
            schemaName="public"
            tableName="person">
        <where>name='Bob'</where>
    </delete>
</changeSet>
changeSet:
  id: delete-example
  author: liquibase-docs
  changes:
  - delete:
      catalogName: cat
      schemaName: public
      tableName: person
      where: name='Bob'
{
  "changeSet": {
    "id": "delete-example",
    "author": "liquibase-docs",
    "changes": [
      {
        "delete": {
          "catalogName": "cat",
          "schemaName": "public",
          "tableName": "person",
          "where": "name='Bob'"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

DELETE FROM cat.person WHERE name='Bob';

Database Support

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