Press "Enter" to skip to content

Widening Indexed Identity Columns

Aaron Bertrand shows what happens when you try to widen an identity integer column associated with an index or computed column:

Summary: We will need to drop and re-create any indexes, clustered or not, that reference the IDENTITY column – in the key or the INCLUDE. If the IDENTITY column is part of the clustered index, this means all indexes, since they will all reference the clustering key by definition. And disabling them isn’t enough.

Getting column sizes right at the beginning is your best bet.  Stay tuned for other alternatives.