Skip to Main Content

Oracle Database Free

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Dropping table with identity column does not get rid of associated sequence

Rene NyffeneggerMay 3 2023 — edited May 3 2023

I am creating a table with an identity column and later drop the table. The sequence associated with the identity column, however, is not dropped. This behavior is different from what I have observed in 19c.

Is this a bug or am I missing something.

The following statements reproduce the behavior on my system:

create table T (
  id   integer generated always as identity
);

drop table T;

select
  (sysdate - created) * 24*60*60 created_secs_ago
from
  user_objects
where
  object_type = 'SEQUENCE' and
  (sysdate - created) * 24*60*60 < 2;
This post has been answered by Loïc Lefèvre-Oracle on May 3 2023
Jump to Answer
Comments
Post Details
Added on May 3 2023
2 comments
1,134 views