Set auto-increment in Dbeaver

Asked

Viewed 881 times

-1

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

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

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
);

inserir a descrição da imagem aqui

1 answer

1


I chose to create Quence for the colunda

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

You solved my problem

Browser other questions tagged

You are not signed in. Login or sign up in order to post.