Search notes:

Oracle: Using an identity column silently creates a sequence

Behind the scenes, Oracle creates a sequence for identity columns.
create table tq84_ident_test (
   id   integer generated always as identity primary key,
   val  number(6,2)
);

select
   object_name,
   (sysdate - created) * 24*60*60 created_secs_ago,
   user_objects.*
from
   user_objects
where
   object_type = 'SEQUENCE'
order by
   created desc;
   
drop table tq84_ident_test;
In Oracle's free edition of 23c, the sequence is not dropped when the table is dropped.

Index


Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 13 database or disk is full in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:84 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(84): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(31): insert_webrequest_('/notes/developm...', 1736940251, '3.144.30.14', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/objects/tables/columns/identity/sequence(53): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 84