Nice! Although I have to admit I've never seen an identity column type before, what does that do? I've never used SQL Server before, so apologies if that's a super obvious question.
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.
serial
auto_increment
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice! Although I have to admit I've never seen an identity column type before, what does that do? I've never used SQL Server before, so apologies if that's a super obvious question.
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 anauto_increment
column in Oracle / MySql.