Liquibase® version 3.8.1 is now available! Get it for free.
2018 XML Announcement
News Liquibase 3.8.1 Released
06 Nov 2019

- and/or -

All Previous Posts >>

Change: ‘update’

Updates data in an existing table

Available Attributes

NameDescriptionRequired ForSupportsSince
catalogNameName of the catalogall
schemaNameName of the schemaall
tableNameName of the tableallall
whereall

Nested Properties

NameDescriptionRequired ForSupportsMultiple AllowedSince
columnsData to update

See the column tag documentation for more information
allallyes
<changeSet author="liquibase-docs"
        id="update-example"
        objectQuotingStrategy="LEGACY">
    <update catalogName="cat"
            schemaName="public"
            tableName="person">
        <column name="address" type="varchar(255)"/>
        <where>name='Bob'</where>
    </update>
</changeSet>
changeSet:
  id: update-example
  author: liquibase-docs
  objectQuotingStrategy: LEGACY
  changes:
  - update:
      catalogName: cat
      columns:
      - column:
          name: address
          type: varchar(255)
      schemaName: public
      tableName: person
      where: name='Bob'
{
  "changeSet": {
    "id": "update-example",
    "author": "liquibase-docs",
    "objectQuotingStrategy": "LEGACY",
    "changes": [
      {
        "update": {
          "catalogName": "cat",
          "columns": [
            {
              "column": {
                "name": "address",
                "type": "varchar(255)"
              }
            }]
          ,
          "schemaName": "public",
          "tableName": "person",
          "where": "name='Bob'"
        }
      }]
    
  }
}

SQL Generated From Above Sample (MySQL)

UPDATE cat.person SET address = NULL WHERE name='Bob';

Database Support

DatabaseNotesAuto Rollback
DB2SupportedNo
DB2SupportedNo
DerbySupportedNo
FirebirdSupportedNo
H2SupportedNo
HyperSQLSupportedNo
INGRESSupportedNo
InformixSupportedNo
MariaDBSupportedNo
MySQLSupportedNo
OracleSupportedNo
PostgreSQLSupportedNo
SQL ServerSupportedNo
SQLiteSupportedNo
SybaseSupportedNo
Sybase AnywhereSupportedNo