I have created a table of the following way:
CREATE TABLE MOTIVE (
IDMOTIVE INTEGER NOT NULL GENERATED DEFAULT AS IDENTITY ( START WITH +1 , INCREMENT BY +1 , CACHE 2 , ORDER ) ,
DESCRIPTION VARCHAR(100) );
Soon I make the load of data with:
INSERT INTO MOTIVE VALUES
(1,'DES 1'),
(2,'DES 2'),
(5,'DES 5'),
(6,'DES 6');
Soon I need that column IDMOTIVE has the property of GENERATED ALWAYS IDENTITY, and can make the load of data with:
INSERT INTO MOTIVE (DESCRIPTION) VALUES
('DES'),
('DESCR');
and consequently the column ID generates ID respective 7 and 8.
Since I can do this?
Thanks!!!