How to setup auto increment for Service-Based Database

纵饮孤独 提交于 2019-12-04 06:20:13

问题


I start build my first local database (Service-Based Database) here Write line to Service-Based Database with textbox, need your help with setup, so I want to set my auto increment in my Properties Identity Specification which is True now, or use some sorting method, thus if any row is removed, second one (next after deleted) must take index of deleted line, and of course same step back for all subsequent rows, and also important, if I have to use any sorting, to keep original order of lines as it was inserted.

For example:

  1. line 1
  2. line 2
  3. line 3
  4. line 4

If line2 is deleted this result:

  1. line 1
  2. line 3
  3. line 4

If all lines deleted, and then inserted new index becomes 1. new first line and not 5. new first line as it now.

来源:https://stackoverflow.com/questions/39155743/how-to-setup-auto-increment-for-service-based-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!