How Do You Tell What Next Identity Column Will Be?

前端 未结 6 1620
遥遥无期
遥遥无期 2020-12-06 19:12

Is there a tsql query to tell what SQL server identity column value it expects to use for the next row insert?

Edited to add:

I deleted and

6条回答
  •  囚心锁ツ
    2020-12-06 19:48

    Use GUID columns for your primary keys. Unless you have billions of records and thousands of requests per second, you probably won't notice the performance difference. But unless you like spending far too much time dealing with stupid issues like this, you will notice the difference in your stress level and life expectancy.

提交回复
热议问题