Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

RENAME SEQUENCE

Use the RENAME SEQUENCE statement to change the name of a sequence.

Only Dynamic Server supports this statement, which is an extension to the ANSI/ISO standard for SQL.

Syntax

Read syntax diagramSkip visual syntax diagram>>-RENAME SEQUENCE--+--------+---------------------------------->
                    '-owner.-'
 
>--old_sequence--TO--new_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, p. Identifier
old_sequence Current name of a sequence Must exist in the current database Identifier, p. Identifier
owner Owner of the sequence Must be the owner of the sequence Owner Name, p. 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.

Related Information

Related statements: ALTER SEQUENCE, CREATE SEQUENCE, DROP SEQUENCE , CREATE SYNONYM , DROP SYNONYM , GRANT, REVOKE, INSERT , UPDATE , and SELECT

For information about generating values from a sequence, see NEXTVAL and CURRVAL Operators (IDS).

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]