Access database ID field is automatically reset to 1

Empty tables in a database ACESS after, before re-add data, wants to start 1, how to do this form of automatic number from it?

The following method tells us that in addition to the method by dump database table, there are a few more simple way:

    A method (provided: a database table can be updated with contents of automatic numbering):

     Open the database, switch to the "Design View", delete the automatically numbered field, to build a similar auto-number field can be.

    Method Two (premise: a database table contents have been emptied):

     Open the database, select the menu "Tools" - "Database Utilities" - "Compact and Repair Database", so OK.

    Method three:

     Using websites program "Database SQL statement" executive function done online, such as "data processing" FeitecCMS program - "Database SQL statement."

Alter TABLE [table name] Alter COLUMN automatic numbering field names COUNTER (initial value you want, 1)

     For example, enter the following two sentences have SQL actuators:

'Empty membership forms
the Delete the From [Ft_User]
' Table members automatically recalculated number field value from the beginning. 1
Alter TABLE [Ft_User] Alter the COLUMN user_id the COUNTER (. 1,. 1)

     It can achieve the desired effect.

Guess you like

Origin www.cnblogs.com/net-sky/p/11345312.html