Posts Tagged ‘primary keys’

Primary Keys do not always have to be ‘Id’!

We’ve all more than likely spotted tables in databases with no primary keys. But does a primary key always have to be defined something like… ?View Code TSQLALTER TABLE MyTable ADD Id INTEGER NOT NULL IDENTITY(1,1) PRIMARY KEY CLUSTERED; I think we have ORM to blame for this widespread practice of using auto-incrementing integers as […]