Monday, October 20, 2014

fill gaps of an identity column

I found out that it is possible to fill gaps in an identity table without reseeding the table ( http://msdn.microsoft.com/en-us/library/ms176057.aspx ).

You can "set identity_insert" option to on to set the values directly ( http://msdn.microsoft.com/en-us/library/ms188059.aspx ).

But:

  • only 1 Table can have this setting on
  • If value inserted > the current identity value for the table -> automatically uses the new inserted value as the current identity value.
kind regards,
Daniel

No comments: