DEV Community

Discussion on: Use the right tool to get identity values back after an insert

peledzohar profile image
Zohar Peled Author

Identity is not a column type but a property you can set on an integer column. (only when creating the column, though).

Once set, SQL Server will automatically populate the identity column with auto-generated values any time you insert rows to the table.

Basically, it's like a serial column in PostgreSQL or an auto_increment column in Oracle / MySql.