Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
binucn
Starting Member
5 Posts |
Posted - 2011-04-08 : 01:25:06
|
| Hi,What are the possible situations for gaps in identity column, other than row deletionthanksBinu |
|
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2011-04-08 : 01:30:45
|
| An error during insert will cause the identity to increment, so subsequent successful inserts would appear to have created a gap.Nathan Skerl |
 |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-04-08 : 02:58:17
|
| The next identity value is taken from the seed. The seed is updated on execution of an insert (not on completion).Possibilities are the seed being updated by a dbcc command, an insert with a specific identity value greater than the seed (direction of step), rows being deleted, an insert starting and not being committed,the seed being lost (not so common now).seehttp://www.simple-talk.com/sql/t-sql-programming/identity-columns/==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
binucn
Starting Member
5 Posts |
Posted - 2011-04-11 : 00:29:33
|
| Thank u very much for the replies.regardsBinu |
 |
|
|
|
|
|