identity column

A column whose values the database generates automatically for each new row, typically a numeric key.

In more detail

PostgreSQL declares it with the standard generated always as identity clause, which replaces the older serial keyword still seen in older articles. In SQLite an INTEGER PRIMARY KEY column is filled automatically in the same way.

Example

id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY

Related terms

Taught in

References