November 26, 2013 at 11:15 am
in my table having the auto increment filed
the id like
1788
1789
1790...
i was did some wrongly set the identity like
SET IDENTITY_INSERT #test ON;
INSERT INTO table (RowID, Name, Dist)
values (11791, 'sri', 'MD');
INSERT INTO table (RowID, Name, Dist) values (11792, 'jim', 'NJ');
SET IDENTITY_INSERT #test OFF;
so my auto increment wrongly set like
1789
1790
11791
11792
pls help me, how to i reset my id auto increment like 1791, 1792.. so for..
in mysql there is have some query.. but how can i fix this problem in mssql.
Thanks in advance
November 26, 2013 at 11:18 am
DBCC CheckIdent
Look in Books Online for the exact syntax and explanation of how it works
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 26, 2013 at 11:58 am
Thanks for your reply.. Yes its works for me..
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply