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 6247447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:52:23+00:00 2026-05-24T12:52:23+00:00

I cant use truncate table in sql server CE (annoyingly) so I use: drop

  • 0

I cant use truncate table in sql server CE (annoyingly) so I use:

drop table mytable

However when I re-insert rows the Ids pick up where they left off. Is there any way to start the Id’s from scratch again?

  • 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-24T12:52:25+00:00Added an answer on May 24, 2026 at 12:52 pm


    Enter DBCC CHECKIDENT:

    Checks the current identity value for the specified table and, if it
    is needed, changes the identity value.

    Usage:

    USE AdventureWorks;
    GO
    DBCC CHECKIDENT ('HumanResources.Employee', RESEED, 30)
    GO
    

    In your case

    Use YourDBName
    GO
    DBCC CHECKIDENT('YourTableName', RESEED, 0)
    GO
    

    Replace YourDBName with your database name, and replace YourTableName with the name of your table, and reseed the value, the last parameter (the 0 in this case) will reseed your ID to that value.

    Edit

    Just read that DBCC CHECKIDENT is not available in CE edition.

    In this case use ALTER TABLE tableName ALTER COLUMN ID Identity (999, 1)

    (999 is the new max of the ID column)…

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

Sidebar

Related Questions

Is there any solution for bulk delete in SQL Server? I can't use TRUNCATE
we use an external Database where we cant edit table designs only add own
I have 2 records in a table in SQL Server 2005 db which has
Straight out of the MSDN docs for Sql Server 2005 : You cannot use
I'm using a reflected sqlalchemy mapped class into a SQL Server table. I DBSession.add()
I'm using code-first EF 4.1 to insert data into a SQL Server database. When
I know that we cant use assignment operator in if statements in java as
i am using diaply tags library for displaying my tables.But i cant use the
Why cant i use code nuggets to set a control property??For example a validationgroup
I use TcxGrid But I cant create fields on execution time because I have

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.