renameSequence

Renames an existing sequence.

Available attributes

Name Description Required for Supports Since
catalogName Name of the catalog all 3.0
newSequenceName New name for the sequence all all
oldSequenceName Name of the sequence to rename all all
schemaName Name of the schema all

XML example

<changeSet  author="liquibase-docs"  id="renameSequence-example">  
    <renameSequence  catalogName="cat"  
            newSequenceName="seq_id"  
            oldSequenceName="seq_id"  
            schemaName="public"/>  
</changeSet>

YAML example

changeSet:  
  id:  renameSequence-example  
  author:  liquibase-docs  
  changes:  
  -  renameSequence:  
      catalogName:  cat  
      newSequenceName:  seq_id  
      oldSequenceName:  seq_id  
      schemaName:  public

JSON example

{  "changeSet":  {  "id":  "renameSequence-example",  "author":  "liquibase-docs",  "changes":  [  {  "renameSequence":  {  "catalogName":  "cat",  "newSequenceName":  "seq_id",  "oldSequenceName":  "seq_id",  "schemaName":  "public"  }  }]  }  }

SQL example

SP_RENAME  seq_id  ,  
seq_id;

Database support

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