Reset Identity column in SQL Server

前端 未结 10 793
遥遥无期
遥遥无期 2021-01-18 00:59

I am making an SQL database that stores contacts. I want to be able to delete contacts, and the correct id for each contact is crucial for my software connecting to it. Lets

10条回答
  •  执笔经年
    2021-01-18 01:31

    This would be much better solved using another method than renumbering the identity column each time a row is deleted.

    Hard to say exactly what else you would do without knowing why your application has this need, but the fact that your application needs this functionality is probably indicative of a design problem somewhere.

提交回复
热议问题