How to restart counting from 1 after erasing table in MS Access?

前端 未结 6 2107
栀梦
栀梦 2020-11-27 04:39

I have table in MS Access that has an AutoNumber type in field ID

After inserting some rows, the ID has become 200

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 05:10

    I always use below approach. I've created one table in database as Table1 with only one column i.e. Row_Id Number (Long Integer) and its value is 0

    INSERT INTO 
    SELECT Row_Id AS 
    FROM Table1;
    

    This will insert one row with 0 value in AutoNumber column, later delete that row.

提交回复
热议问题