Search notes:

Oracle: identity columns - START WITH and INCREMENT BY clauses

When defining an Identity column, the start with and/or increment by options can be used to control with what number the generated numbers should begin or in what intervals they should increase.
create table tq84_identity (
  id   number generated as identity start with 10 increment by 3 primary key,
  txt  varchar2(10)
);


insert into tq84_identity(txt) values ('ten'     );
insert into tq84_identity(txt) values ('thirteen');
insert into tq84_identity(txt) values ('sixtenn' );

select * from tq84_identity;

drop table tq84_identity purge;
Github repository Oracle-Patterns, path: /DatabaseObjects/Tables/12c/identity_start_with.sql

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759612606, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/objects/tables/columns/identity/start-with(48): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78