Click here to Skip to main content
15,886,763 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sometimes my identity columns big jumps

my sql server table is
create table Invoice_Details
(
Invoice_No int not null identity(1,1),
Inv_date datetime,
Customer_Name varchar(100),
Primary Key(Invoice_No)
);

In My Table my Data is

72764	2020-07-09	ABC
72763	2020-07-09	XYZ
71764	2020-07-09	PER
71763	2020-07-09	PQR
2599	2020-07-09	BVC


What I have tried:

I add -T272 in startup parameter

still problem not solved.
Posted
Updated 17-Jul-20 20:07pm

1 solution

I'd check your code - all of it that does INSERT or UPDATE operations, and that includes SP's as well as "external" software. It is possible to change the "current index" for IDENTITY values, and it's most likely that it's a fault in external software rather than SQL itself.

But even if it does "jump" - which I've never seen with "well-behaved" apps - what does it matter? It's not supposed to be used as if it was sequential anyway! :laugh:
 
Share this answer
 
Comments
hareshdgr8 18-Jul-20 2:10am    
sir in external software i just pass data like
insert into Invoice_Details(Inv_date,Customer_Name) values('2020-07-17','HARESH');

What is wrong sir...

Please tell me if any idea.

Thank you for your reply.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900