HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlMajor

How do I specify that a column should be auto-incremented in pgAdmin?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
pgadminhowcolumnautothatshouldincrementedspecify

Problem

I have started to learn pgAdmin III to manage a PostgreSQL database. But it wasn't an easy to use application.

If I create or have created a table with pgAdmin III, how can I add "auto-increment"-functionality on a column id that has type integer?

Solution

This is pretty easy in pgAdmin 4.

First, add a column to your table, then click the little edit icon:

Then go to Constraints and select the Identity type:

Save your table and the column will auto-increment.

Context

StackExchange Database Administrators Q#1281, answer score: 23

Revisions (0)

No revisions yet.