thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Intermediate

Identity Column

A column whose values the database generates automatically, typically incrementing integers, often used as a surrogate key.

Definition

Identity columns are declared as IDENTITY(seed, increment) in SQL Server and Snowflake, GENERATED AS IDENTITY in ANSI and Databricks, or AUTO_INCREMENT in MySQL. Values may have gaps after rollbacks or deletes and are not guaranteed to be contiguous.

Example

CustomerKey BIGINT GENERATED ALWAYS AS IDENTITY

Exam tip

Never rely on identity values being gap-free or reflecting insertion order in distributed engines.

Related terms