我有一个 MS Access 2007年
数据库
这在客户
表。
我已删除所有记录。但插入新记录后,客户ID
返回 301
;但我想将其设置为 1
。
I have deleted all records. but after inserting a new record CustomerID
returns 301
; but I want to set it to 1
.
我试着以下查询:
ALter Table Customer alter column CustomerID Counter(1,1)
,但它不工作
but it doesn't work
我如何才能MSACCESS ??
How can I reset an identity column in MSAccess??
感谢
在业务方面,你可以删除重新进行添加列。
On the operational side, you can drop an readd the column.
在战略方面,我想你应该重新考虑这个问题:如果在值标识列的是,离开是唯一的,事情的话,你可能会朝着一个危险的方向:你应该考虑这样的列的作为是完全地没有内容,除了是一种方法,唯一解决一行。
On the strategic side, I think you should rethink the problem: If the value of an identity column, apart from being unique, matters to you, you might be heading in a dangerous direction: You should think of such a column as being completly without content, apart from being a way to uniquely address a row.