Reset AutoIncrement in SQL Server after Delete

0 votes

In a SQL Server database table, I have removed some records.

The table's IDs are displayed as follows:

99 100 101 1200 1201...

I want to remove the later entries (IDs more than 1200), after which I want to reset the auto-increment so that the 102nd ID will be generated automatically. Since my records are ordered by date, can I do this in SQL Server?

Aug 27 in Database by Kithuzzz
• 11,640 points
11 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
0 answers

Reset identity seed after deleting records in SQL Server

A SQL Server database table has had ...READ MORE

Aug 22 in Database by Kithuzzz
• 11,640 points
10 views
0 votes
1 answer

How to delete duplicate rows in SQL Server?

CTEs and ROW_NUMBER can be combined together which will ...READ MORE

answered Feb 10 in Database by Vaani
• 7,020 points
102 views
0 votes
0 answers

What is the difference between drop table and delete table in SQL Server?

What is the distinction between the following ...READ MORE

Aug 9 in Database by Kithuzzz
• 11,640 points
63 views
0 votes
0 answers

How to display two digits after decimal point in SQL Server?

I want to return the value of ...READ MORE

Aug 26 in Database by Kithuzzz
• 11,640 points
32 views
0 votes
1 answer

How do I UPDATE from a SELECT in SQL Server?

MERGE INTO YourTable T USING ...READ MORE

answered Feb 3 in Database by Vaani
• 7,020 points
119 views
0 votes
0 answers

How do I UPDATE from a SELECT in SQL Server?

INSERT INTO Table (col1, col2, col3) SELECT col1, ...READ MORE

Feb 4 in Database by Vaani
• 7,020 points
44 views
0 votes
1 answer

Auto Increment in SQL

Auto increment keyword allows the user to ...READ MORE

answered Sep 28, 2018 in Database by DataKing99
• 8,240 points
198 views
0 votes
1 answer

Calculate Time Intersection to Correlate Sequences of Independent Events

I think this solution requires a CROSS JOIN implementation. ...READ MORE

answered Oct 26, 2018 in Power BI by Upasana
• 8,620 points
330 views
0 votes
1 answer

What are the different authentication modes in SQL Server? How can it be changed?

Windows mode and Mixed Mode – SQL ...READ MORE

answered Oct 29, 2018 in Database by Sahiti
• 6,380 points
647 views
0 votes
1 answer

Time Series Chart in Power BI

Your Date format should be handled by ...READ MORE

answered Nov 26, 2018 in Power BI by Upasana
• 8,620 points
3,607 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP