Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 411785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:01:16+00:00 2026-05-12T18:01:16+00:00

I have a few tables in SQLite and I am trying to figure out

  • 0

I have a few tables in SQLite and I am trying to figure out how to reset the auto-incremented database field.

I read that DELETE FROM tablename should delete everything and reset the auto-incremement field back to 0, but when I do this it just deletes the data. When a new record is inserted the autoincrement picks up where it left off before the delete.

My ident field properties are as follows:

  • Field Type: integer
  • Field Flags: PRIMARY KEY, AUTOINCREMENT, UNIQUE

Does it matter I built the table in SQLite Maestro and I am executing the DELETE statement in SQLite Maestro as well?

Any help would be great.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:01:16+00:00Added an answer on May 12, 2026 at 6:01 pm

    Try this:

    delete from your_table;    
    delete from sqlite_sequence where name='your_table';
    

    SQLite Autoincrement

    SQLite keeps track of the largest
    ROWID that a table has ever held using
    the special SQLITE_SEQUENCE table. The
    SQLITE_SEQUENCE table is created and
    initialized automatically whenever a
    normal table that contains an
    AUTOINCREMENT column is created. The
    content of the SQLITE_SEQUENCE table
    can be modified using ordinary UPDATE,
    INSERT, and DELETE statements. But
    making modifications to this table
    will likely perturb the AUTOINCREMENT
    key generation algorithm. Make sure
    you know what you are doing before you
    undertake such changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a sqlite db that at the moment has few tables where the
I have few activities that make use of sqlite database, there is use of
I have got a few tables which I am trying to join. I just
I have a database with few tables, ex.: Employee (Id, Name, state, country) Material
I have a MS Access database with few tables and a form. When more
So I have a database with a few tables. The first table contains the
I have few tables in the database with parent table say P is having
I have a few tables that reference the same table. For example: Person has
I have a few create statements that should be run when a database is
Say that I have a few tables that never change, such as a 'State'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.