更新或设置SQL Server中的自动增量列 [英] Update or Set the auto increment column in Sql Server
本文介绍了更新或设置SQL Server中的自动增量列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,
我有在线购物网站.我已经从产品"表中的数据库中删除了一些产品.在该表中,我有一个字段名称ID,该ID是自动递增的.现在,我想在产品"表中上传新产品.之后要更新ID字段.我想设置我先前删除的记录的ID....
是否可以设置该ID?
重播
谢谢....
hello friends,
i have online shopping website. i have deleted some product from database in Product table. in that table i have one field name ID which is auto increment. now i want to upload a new product in my Product table. after that want to update the ID field. i want to set the ID of that record which i previously deleted....
IS that posible to Set that ID???
Replay
Thank You....
推荐答案
不,你不能.
我知道的唯一方法是截断表,然后再次插入所有记录!
No,You can''t.
The only way I know by truncating your table then by inserting all records again!
这篇关于更新或设置SQL Server中的自动增量列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文