renameView

Renames an existing view.

Available attributes

Name Description Required for Supports Since
catalogName Name of the catalog all 3.0
newViewName Name to rename the view to all all
oldViewName Name of the view to rename all all
schemaName Name of the schema ingres, mariadb, mssql, mysql, postgresql, sqlite, sybase

XML example

<changeSet  author="liquibase-docs"  id="renameView-example">  
    <renameView  catalogName="cat"  
            newViewName="v_person"  
            oldViewName="v_person"  
            schemaName="public"/>  
</changeSet>

YAML example

changeSet:  
  id:  renameView-example  
  author:  liquibase-docs  
  changes:  
  -  renameView:  
      catalogName:  cat  
      newViewName:  v_person  
      oldViewName:  v_person  
      schemaName:  public

JSON example

{  "changeSet":  {  "id":  "renameView-example",  "author":  "liquibase-docs",  "changes":  [  {  "renameView":  {  "catalogName":  "cat",  "newViewName":  "v_person",  "oldViewName":  "v_person",  "schemaName":  "public"  }  }]  }  }

SQL example

RENAME  TABLE  cat.v_person  TO  cat.v_person;

Database support

Database Notes Auto rollback
DB2/LUW Not Supported Yes
DB2/z Not Supported Yes
Derby Not Supported Yes
Firebird Not Supported Yes
H2 Not Supported Yes
HyperSQL Not Supported Yes
INGRES Supported Yes
Informix Not 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 Not Supported Yes