数据库中已删除记录的数字主键是否可以重用于将来的新记录? [英] Do numerical primary keys of deleted records in a database get reused for future new records?
本文介绍了数据库中已删除记录的数字主键是否可以重用于将来的新记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
例如,如果我有一个自动编号的字段,我添加新的记录,而不指定此字段,并让数据库引擎为我挑选它。
所以,它会选择被删除的记录的号码?如果是,当?
For example if I have an auto-numbered field, I add new records without specifying this field and let DB engine to pick it for me.
So, will it pick the number of the deleted record? If yes, when?
// SQL Server,MySQL。 //
// SQL Server, MySQL. //
推荐答案
否。数字主键不会重复使用,除非你手动指定它们(你应该真的避免这样!)
NO. numerical primary keys will not reused, except you specify them manually(you should really avoid this!)
这篇关于数据库中已删除记录的数字主键是否可以重用于将来的新记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文