SQL Azure Reset autoincrement

2020-08-25 08:45发布

问题:

I found a lot of topics telling to use :

DBCC CHECKIDENT ('table', RESEED, 0)

But this is not supported by Azure SQL. Does somebody have any idea on how to do it easily ?
Thanks a lot !

回答1:

DBCC CHECKIDENT is not supported for now in SQL Azure as you commented.

Check this MSDN forum post, there are some solutions proposals, maybe one of them can help you out.



回答2:

You don't have too many options... the only one I can think of is to drop and recreate your table.