3 ms·
I was at a new client the other day and notice that for all their tables in SQL SERVER, they use an IDENTITY column for primary keys, obviously seeded by SQL SE
by iask 9y ago
I was at a new client the other day and notice that for all their tables in SQL SERVER, they use an IDENTITY column for primary keys, obviously seeded by SQL SERVER. What I found strange is that they allow deletes of records, allowing gaps in the sequence.
Is that normal practice? Their DBA was insisting that its normal.
- dethswatch 9y agoNo, it's not. Also- wrt SQL Server ignore anything they say about GUID's as indexes. Just don't cluster them. Also- enjoy the benefit of not having to ever ask the DB what the pk of those records you want to insert is going to be.