I have problems to create a column that auto-generates its code, I think it could be done with a trigger but I would like not to have to do it like that and use identity but it always generates this error and does not I know how to solve it.
CREATE TABLE UBIGEO
(
CODUBI NUMBER GENERATED ALWAYS AS IDENTITY,
IDUBI VARCHAR2(8) NOT NULL,
CONSTRAINT UBIGEO_PK PRIMARY KEY (CODUBI),
CONSTRAINT UBIGEO_UK1 UNIQUE (IDUBI)
ENABLE
);