RENAME SEQUENCE statement

Use the RENAME SEQUENCE statement to change the name of a sequence. This statement is an extension to the ANSI/ISO standard for SQL.

Syntax

RENAME SEQUENCE [ owner. ] old_sequenceTOnew_sequence
Element Description Restrictions Syntax
new_sequence New name that you declare here for an existing sequence Must be unique among the names of sequences, tables, views, and synonyms in the database Identifier
old_sequence Current® name of a sequence Must exist in the current database Identifier
owner Owner of the sequence Must be the owner of the sequence Owner name

Usage

To rename a sequence, you must be the owner of the sequence, have the ALTER privilege on the sequence, or have the DBA privilege on the database.

You cannot use a synonym to specify the name of the sequence.

In a database that is not ANSI compliant, the name of new_sequence (or in an ANSI-compliant database, the combination of owner.new_sequence) must be unique among sequences, tables, views, and synonyms in the database.