Reset Identity column in SQL Server

前端 未结 10 795
遥遥无期
遥遥无期 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:20

    Thats is going to get real slow once you have more than a trivial amount of records in the database. The identity column will not work for you, you need to do some custom tsql to keep changing all the numbers - but a very bad idea, imo.

    Why not use a date/time stamp if you need to keep track of the ordered they were added.

    You need to re-think your design.

提交回复
热议问题