Quantcast
Viewing all articles
Browse latest Browse all 15

How to reset Auto Incerement Colum Value as 1 after some Transaction


--first delete all data from tables and then reset

If you want to reset only one table colum then


DBCC CHECKIDENT('Roles', RESEED, 0)  


--if you want to reset from 2 3 upto any no then pass this no in query


exec sp_MSforeachtable @command1 = 'DBCC CHECKIDENT (''?'', RESEED,0)'

--Reset autoincrement id as 1 of all tables


Viewing all articles
Browse latest Browse all 15

Trending Articles