Hello to all. Faced with an unusual problem. I have a DB, the COUPON_ID column is defined using an identifier, and is incremented every time by 1. Example table:
CREATE TABLE Coupon ( COUPON_ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), TITLE VARCHAR(30), START_DATE DATE, END_DATE DATE, AMOUNT INTEGER, TYPE VARCHAR(20), MESSAGE VARCHAR(300), PRICE DOUBLE, IMAGE VARCHAR(500), CONSTRAINT PRIME_COUPON_ID PRIMARY KEY(COUPON_ID) ); Let's say I entered new data, changed or deleted ... and everything works OK. And so the question arose when deleting. If I have a certain number of lines, let's say 1000 which I intend to delete. Everything is deleted normally and everything continues to work normally. But the question is, what should I do with these empty lines? If I want to insert something into them, then Derby refuses because I have marked the id of the column COUPON_ID as an identified column and it increases step by step. And I would like the empty spaces of the lines not to accumulate. Is there a solution to this problem?