In this SharePoint tutorial, we will discuss, how to reset SharePoint list item id. We will be able to know, how to reset id number in the SharePoint list.
Every SharePoint list item will have one ID associated with it. If you have 5 items and you delete all 5 items from the SharePoint list then next time if you will try to add one item to the list then the id will starts from 6 not with 1.
There is no out of box way you can reset the id apart from resetting the value in the SharePoint content database.
Rest SharePoint list item id
One approach you can do is, you can Save the List as a template and can use the same template to create a new list in SharePoint 2013/2016/Online. You can follow this article to check.
Reset id sharepoint list (Update in Database)
The other way to rest sharepoint list item id is you can modify in the SharePoint database, and this is not a recommended approach.
Remember if you are using SharePoint Online, then you can not modify any database, so this approach will work only in SharePoint 2013/2016.
Before opening your database for modification, make sure you have the list GUID.
AllListsAux table in the content database maintains information about Item count and Id details for all lists.
Then open the database and run the below command:
SELECT * FROM [ContentDBName].[dbo].[AllListsAux] where ListID='GUID of the List'
SELECT * FROM [WSS_Content].[dbo].[AllListsAux] where ListID='B13CC473-6187-4478-A0DD-853E83AA6F9D'
It will display like below:
Now if you will add an item to SharePoint list, the next list item ID will be generated like below:
Then Run the below command to reset the value:
UPDATE [Content DB].dbo.AllListsAux set NextAvailableId=1 where ListID='GUID of the List'
UPDATE [WSS_Content].dbo.AllListsAux set NextAvailableId=1 where ListID='B13CC473-6187-4478-A0DD-853E83AA6F9D'
Now if you will add an item to the list, then the item will be reset (Item ID will start from 1) like below:
But Microsoft strictly does not recommend to change anything in the content database. Take special care while doing this kind of modification.
You may like following SharePoint list and document library tutorials:
- SharePoint 2016 crud operations using Rest API and jQuery on SharePoint list or document library
- Different between SharePoint list and Document library
- SharePoint Unique Permissions to List & Document Library in SharePoint Online Step by Step Tutorial
- Migrate files or documents from File Shares to SharePoint Online document library Using FREE Microsoft SharePoint Migration Tool
I hope this article will be helpful to reset list item id SharePoint 2013/2016 or SharePoint 2019. I hope it solved the below queries:
- SharePoint list reset id
- Rest sharepoint list item id
- sharepoint list reset id counter
- reset id sharepoint list
- reset sharepoint list id
- how to reset id in sharepoint list
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com