dropColumn
The dropColumn Change Type drops existing columns.To drop a single column, use the simple form of this element where the tableName and columnName are specified as attributes.
To drop several columns, specify the tableName as an attribute, and then specify a set of nested <column> tags. If nested <column> tags are present, the columnName attribute will be ignored. Alternatively, you can use separate dropColumn statements to drop more than one column.
Available attributes
Name | Description | Required for | Supports | Since |
| Name of the catalog | all | 3.0 | |
| Name of the column to drop, if dropping a single column. Ignored if nested columns are defined | all | ||
| Name of the schema | all | ||
| Name of the table containing the column to drop | all | all |
Nested tags
Name | Description | Required for | Supports | Multiple allowed |
Columns to be dropped if dropping multiple columns. If this is populated, the Note: YAML and JSON changelogs using the | all | yes |
Database support
Database | Notes | |
DB2/LUW | Supported | No |
DB2/z | Not Supported | No |
Derby | Supported | No |
Firebird | Supported | No |
Google BigQuery | Supported | No |
H2 | Supported | No |
HyperSQL | Supported | No |
INGRES | Supported | No |
Informix | Supported | No |
MariaDB | Supported | No |
MySQL | Supported | No |
Oracle | Supported | No |
PostgreSQL | Supported | No |
Snowflake | Supported | No |
SQL Server | Supported | No |
SQLite | Supported | No |
Sybase | Supported | No |
Sybase Anywhere | Supported | No |
dropColumn examples
--liquibase formatted sql
--changeset liquibase-docs:dropColumn-example
ALTER TABLE cat.person
DROP COLUMN address;