Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sequences created by IDENTITY columns are not removed when table is dropped?

user11763611Aug 5 2013 — edited Aug 6 2013

Hello,

Is it normal that system-sequences generated by IDENTITY columns are kept after dropping the table?

I expected that the automatic sequence is dropped implicitly...

SQL> create table t1 ( key integer generated by default as identity, c char(10) );

Table created.

SQL> select sequence_name from all_sequences where sequence_name like 'ISEQ%';

SEQUENCE_NAME

--------------------------------------------------------------------------------

ISEQ$$_94107

SQL> drop table t1;

Table dropped.

SQL> select sequence_name from all_sequences where sequence_name like 'ISEQ%';

SEQUENCE_NAME

--------------------------------------------------------------------------------

ISEQ$$_94107

SQL> create table t1 ( key integer generated by default as identity, c char(10) );

Table created.

SQL> select sequence_name from all_sequences where sequence_name like 'ISEQ%';

SEQUENCE_NAME

--------------------------------------------------------------------------------

ISEQ$$_94107

ISEQ$$_94109

2 rows selected.

Thanks

Seb

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2013
Added on Aug 5 2013
17 comments
12,547 views