Create Table

Available attributes

Name Description Required for Supports
catalogName Name of the catalog all
remarks Comments stored for the table all
schemaName Name of the schema all
tableName Name of the table all all
tablespace Name of the tablespace, the table created in all

Nested properties

Name Description Required for Supports Multiple allowed
columns Column definitions

See the Column tag documentation for more information
all all yes

XML example

<changeSet  author="liquibase-docs"  id="createTable-example">  
    <createTable  catalogName="cat"  
            remarks="A String"  
            tablespace="A String">  
        <column  name="address"  type="varchar(255)"/>  

YAML example

  id:  createTable-example  
  author:  liquibase-docs  
  -  createTable:  
      catalogName:  cat  
      -  column:  
          name:  address  
          type:  varchar(255)  
      remarks:  A String  
      schemaName:  public  
      tableName:  person  
      tablespace:  A String

JSON example

{  "changeSet":  {  "id":  "createTable-example",  "author":  "liquibase-docs",  "changes":  [  {  "createTable":  {  "catalogName":  "cat",  "columns":  [  {  "column":  {  "name":  "address",  "type":  "varchar(255)"  }  }]  ,  "remarks":  "A String",  "schemaName":  "public",  "tableName":  "person",  "tablespace":  "A String"  }  }]  }  }

SQL example

CREATE  TABLE  cat.person  (address  VARCHAR(255)  NULL)  COMMENT='A String';  

ALTER  TABLE  cat.person  COMMENT  =  'A String';

Database support

Database Notes Auto rollback
DB2/LUW Supported Yes
DB2/z Supported Yes
Derby Supported Yes
Firebird Supported Yes
H2 Supported Yes
HyperSQL Supported Yes
INGRES Supported Yes
Informix Supported Yes
MariaDB Supported Yes
MySQL Supported Yes
Oracle Supported Yes
PostgreSQL Supported Yes
SQL Server Supported Yes
SQLite Supported Yes
Sybase Supported Yes
Sybase Anywhere Supported Yes