-1

As an overview.

I created a table and set under Identity Specification on the primary key column, the Identity Increment to 1 and the Identity Seed to 1 as well(in the Design of the table).

I noticed however the the increment(when inserting values) would be 1...2 and then 1001...1002...1003.

Why does this happen?

This is the CREATE script of the table

CREATE TABLE [dbo].[Opl_Question](
[Question_Id] [int] IDENTITY(1,1) NOT NULL,
[QuestionName] [nvarchar](500) NULL,
[QuestionDescription] [nvarchar](500) NULL,
[QuestionType] [nvarchar](20) NULL,
[DateCreated] [datetime] NULL,
[DateUpdated] [datetime] NULL,
[ChecboxCountCorrect] [int] NULL,
[OPL_Id] [int] NULL,
 CONSTRAINT [PK_Opl_Question] PRIMARY KEY CLUSTERED 
(
    [Question_Id] ASC
   )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]

   GO

The inserting is a manual adding of some data at the moment

USE DB
GO



 INSERT INTO Opl_Question(QuestionName, QuestionDescription, QuestionType, DateCreated, DateUpdated, ChecboxCountCorrect, OPL_Id)
 VALUES('2. Question 2', '2. Question 2', 'radio', GETDATE(), GETDATE(), 0, 2)
Arianule
  • 8,811
  • 45
  • 116
  • 174
  • Edit your question and provide your create statement for the table.. – PowerStar Mar 09 '17 at 07:13
  • 4
    Possible duplicate of [Identity column value suddenly jumps to 1001 in sql server](http://stackoverflow.com/questions/17587094/identity-column-value-suddenly-jumps-to-1001-in-sql-server) – Shakeer Mirza Mar 09 '17 at 07:21
  • Possible duplicate of [Identity increment is jumping in SQL Server database](http://stackoverflow.com/questions/14146148/identity-increment-is-jumping-in-sql-server-database) – James Z Mar 11 '17 at 20:05

1 Answers1

2

You can find here the answer. if you set seed normal values (I see you set it) it is not about you. Take a look forementioned link.

Community
  • 1
  • 1
Dogan
  • 96
  • 6
  • I have just seen this page accidentally. This is detailed explain really god.https://www.codeproject.com/tips/668042/sql-server-2012-auto-identity-column-value-jump-is – Dogan Mar 09 '17 at 07:41