问题描述
嗨
我创建了一个表ID int是我放置的那个表的主键
身份规范:是
IsIdentity:是
身份增量:1
身份种子:1
我的问题是
当我插入记录时,它的工作正常
但是当我删除记录时,身份不会被贬低
例如,我有15条记录,我删除了第15条记录,并插入了新记录,但是现在需要16条记录作为新记录的15.
上面的实验是在asp.net网站上的Gridview控件上完成的,我是从Grideview启用删除属性中完成的
Hi
i created a table ID int is a primary key for that table i put
Identity Specification :yes
IsIdentity :yes
Identity Increment :1
Identity Seed :1
my problem is
when i inserting records its working fine
but when i deleting records the identity is not decrimented
for example i have 15 records i deleted the 15 th record and inserted the new record but now it takes 16 as new record insted of 15.
The Above experiment is done on Gridview control in asp.net website i did this from Grideview Enable Deleting Property
how to solve this
推荐答案
这篇关于身份增量中的主键问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!