如何重置在MS Access标识列标识、MS、Access

2023-09-03 04:15:49 作者:带我强大给媳妇满屋零食

我有一个 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.

 
精彩推荐
图片推荐