IDENTITY not generating sequential values

 ̄綄美尐妖づ 提交于 2019-12-11 08:03:43

问题


I am running the below query to create a dimension table; however the identity column is not yielding sequential values; the values are very random. Any reason for this?

I have tried a stored procedure and also a manual insert; but the result is the same

CREATE TABLE Dim.CDIM_State (
intStateDimKey int IDENTITY(1,1) NOT NULL, txtState nvarchar(250), dtCreatedOn datetime, dtModifiedOn datetime ) WITH ( DISTRIBUTION = REPLICATE, CLUSTERED COLUMNSTORE INDEX )

The output is something like this; I expect sequential values viz. 1,2,3,4,5

click to see the results I am getting


回答1:


That is correct. There are separate counters for each distribution.

It won't affect your dimension, the values will always be unique.



来源:https://stackoverflow.com/questions/56258623/identity-not-generating-sequential-values

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!