Skip to content
Home » Oracle » How Oracle Rename Sequence

How Oracle Rename Sequence

To rename a sequence, we should RENAME TO statement to rename it, but you have to login as the object's owner. For example:

SQL> show user
USER is "OE"
SQL> select object_type from user_objects where object_name = 'ORDERS_SEQ';

OBJECT_TYPE
-----------------------
SEQUENCE

SQL> rename orders_seq to order_id_seq;

Table renamed.

Although it returned "Table renamed.", the object is not necessarily a table.

Leave a Reply

Your email address will not be published. Required fields are marked *