Is there any real world reason to list a missing identity in a table? Readers had no new script, but a lively discussion on whether gaps matter.
Finding Duplicates Before Adding a Unique Constraint
A unique constraint fails on the first duplicate it meets and tells you about only one. Here is how to list them all and clean up safely.
SQL SERVER – Puzzle – Write Script to Generate Primary Key and Foreign Key
A puzzle from a migration project: SSMS cannot script every Primary Key and Foreign Key at once. Can you write a script that generates them all?
SQL SERVER – Two Methods to Retrieve List of Primary Keys and Foreign Keys of Database
There are two different methods to retrieve the list of Primary Keys and Foreign Keys from the database.
SQL SERVER – Clustered Index on Separate Drive From Table Location
A Jr. developer asked if a clustered index can live on a separate Drive from its table. The answer is no, and the clustered vs non clustered difference shows why.
Preventing Overbooking When Two Sessions Grab the Last Seat
Learn preventing overbooking through a last-seat race, an atomic update, update locks, and a database constraint that rejects oversold inventory.
SQL SERVER – Difference Between Candidate Keys and Primary Key
What is the difference between a candidate key and a primary key? A table can have many candidate keys, but only one of them becomes the primary key.







