Identity Fields Review is a chapter abstract from the Joes 2 Pros SQL Query Techniques Tutorial for SQL Server 2012, a book first tested in my classroom.
Identity Overflow Check: How Close Is Each INT Column to 2,147,483,647
A table with few rows can still be one insert away from error 8115. Here is a check that shows the real headroom of every INT identity column.
Explicit Identity Values: Loading Rows With Their Old Keys
Moving rows and keeping their old keys? Here is the safe order of steps, and the counter check that saves you from a collision.
Identity Column Quiz: Why Did My IDs Skip a Number?
This Identity Column Quiz starts with three rows and one rolled-back insert, then asks what ID the next row gets. The answer is 5, not 4. A tested script proves it and shows two more ways numbers go missing.
SQL SERVER – Tips from the Development Series – Overriding Identity Fields – Day 9 of 35
Identity fields give each new customer or invoice a unique number, even with many users entering data. Here is when and how to go about Overriding Identity Fields.
SEQUENCE Cache Size, Gaps and Insert Throughput
Compare SEQUENCE cache size, restart gaps, rollback gaps, and insert throughput with CACHE 50, CACHE 1000, and NO CACHE.
Migrating From MySQL to SQL Server: AUTO_INCREMENT, LIMIT and Other Differences
Plan migrating from MySQL with clear translations for identity values, paging, dates, booleans, string functions, and upserts.






