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

  • Home
  • SEARCH
  • 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 8508691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:13:46+00:00 2026-06-11T03:13:46+00:00

I have a filled SDF database file, I need to clean every record of

  • 0

I have a filled SDF database file, I need to clean every record of tables. But if I do it by hand, Primary keys will not start with 1 after add record in table. And records will create with id (for example 4091+). So, how can I delete all data and set all primary keys to 1.

My database is too large and have many associations, because of this I cannot just delete all tables and create new. It takes a lot of time.

Sorry for my English.

Thank you.

  • 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-06-11T03:13:48+00:00Added an answer on June 11, 2026 at 3:13 am

    You have to truncate the table…

    TRUNCATE TABLE tbl_name
    

    Truncate deletes all the record along with resetting the id equal to 0.

    If TRUNCATE not available in your database, you can simply delete the record

    DELETE from tbl_name

    and reset the Identity column in following way:

    ALTER TABLE tbl_name ALTER COLUMN id IDENTITY (1,1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datagrid that I have filled with data from a sql database.
I have dynamic array filled with bytes, which are read from .raw file with
I have a local Microsoft SQL Server Compact 3.5 database (.sdf) in my WPF
I have filled splitcontainer. legend for image: SplitContainer ListViews Spliter Need: blue lines show
What's the best way to have propeties filled out in a Liquibase SQL file?
I have filled the listview using the code given below, but I'm unablee to
I am having two tables question_bank(ques_id,question,answer,a,b,c,d) random_question_bank(user_id,q1,q2,............,q20) I have filled the user_id from users.
I have filled List<Object1> Object 1 contain 2 fields (int id & string name)
i have dropdownlist of year which is coming dynamically.i have filled the dropdownlist using
I have ArrayProxy filled with different values, and after tossing it in iterator and

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.