Setar auto-increment in DBeaver

-2

After creating the idpagamentoCielo column as the primary key, I was not able to add the auto-increment property to the column.

How can I assign the auto-increment property to the idpagamentoCielo column?

Note: the database is postgresql

Automatic generation SQL :

CREATE TABLE public.pagamentocielo (
    idpagamentocielo int NOT NULL,
    CONSTRAINT pagamentocielo_pk PRIMARY KEY (idpagamentocielo)
)
WITH (
    OIDS=FALSE
);

    
asked by anonymous 04.09.2018 / 14:55

1 answer

1

I chose to create the sequence for the colunda

INSERT into pagamentocielo values (nextval('idpagamentocielo_seq'),'txtxtxt');

Solved my problem

    
04.09.2018 / 15:30