All Identity columns create a sequence in the backend. In your sequence_option
of your identity column you have not provided the MINVALUE
that’s why by default it is considering the MINVALUE
as 1
. So you have to explicitly define the MINVALUE
like below:
ALTER TABLE gender
ALTER COLUMN gender_id ADD GENERATED ALWAYS AS IDENTITY (MINVALUE 0 START WITH 0 INCREMENT BY 1)
CLICK HERE to find out more related problems solutions.