SDU Tools: Listing SQL Server user tables that have no primary key

SQL Server tables should have a primary key. I’m not talking about a clustering key (that’s a different topic) but a key that logically identifies each row, and isn’t ever NULL.
I have SQL purist friends that argue that a table without a primary key really isn’t a table.
When I’m reviewing database designs, one of the things I look for is the lack of a primary key on tables. It’s not just a purist issue. Without a primary key, other features like replication are problematic.
2019-07-03


