c#.net中的自动增量问题 [英] Auto increment problem in c#.net
本文介绍了c#.net中的自动增量问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用vs 2008和sql server。问题是每当我在表中插入新记录时,它都会插入但是自动增量值会跳过该数字。任何解决方案PLZ?
I am using vs 2008 and sql server. Problem is whenever i insert a new record in a table, it is inserted but auto increment value skips the number. Any solution plz?
推荐答案
我估计,所谓的问题是
您最近插入了3条记录,如
ID 名称 价值
1 RK 100
2 Karthick 200
3 Prabakar 300
您已从表中删除 ID 2和3 ,
现在您要插入另一组记录喜欢
Mani 400
Kaajal 500
进入表格,现在插入为
4 Mani 400
5 Kaajal 500
决赛桌内容将是这样的
ID 姓名 价值
1 RK 100
4 Mani 400
5 Kaajal 500
如果对,那么这在sql server中不是问题,那么你应该参考这个链接 [ ^ ]
希望这对你有所帮助。
问候,
RK
Hi,
I reckon, the so called problem is
You have inserted 3 records initially like
ID Name Value
1 RK 100
2 Karthick 200
3 Prabakar 300
You have deleted ID 2 and 3 from the table,
now you are inserting another set of records like
Mani 400
Kaajal 500
into the table, now it is inserted as
4 Mani 400
5 Kaajal 500
Final table content would be like this
ID Name Value
1 RK 100
4 Mani 400
5 Kaajal 500
If am right then this is not a problem in sql server,then you should refer this link[^]
Hope this could help you a bit.
Regards,
RK
这篇关于c#.net中的自动增量问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文