My SQL uses the AUTO_INCREMENT keyword to perform an auto-increment feature.
By default, the starting value for AUTO_INCREMENT is 1, and it will increment by 1 for each new record.
One nice feature of SQL Server that is used quite a bit is the use of identity columns.
The only clean way to do this is to create a new column and make it an identity column or create a new table and migrate your data.
Microsoft SQL Server provides several functions to do this: @@IDENTITY provides the last value generated on the current connection in the current scope, while IDENT_CURRENT(tablename) provides the last value generated, regardless of the connection or scope it was created on.
Unfortunately this is part of a much larger project. Forgive me if this shouldn't be logged here or I have done something stupid, publishing migrations doesn't seem to apply the Identity flag to a column but only on Sql Server. Migrations are currently only generated based on the active provider (SQLite).
An Identity column is a column (also known as a field) in a database table that is made up of values generated by the database.
This is much like an Auto Number field in Microsoft Access or a sequence in Oracle.