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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:52:47+00:00 2026-06-10T21:52:47+00:00

I am trying to reseed the auto increment value from the current auto increment

  • 0

I am trying to reseed the auto increment value from the current auto increment value of the table in SQL.
I did something like

USE [MyDatabase]
GO

SELECT IDENT_CURRENT('MyTable') AS Current_Identity
DBCC CHECKIDENT (MyTable, reseed, Current_Identity)

I get the following error:

(1 row(s) affected)
Msg 2560, Level 16, State 9, Line 3
Parameter 3 is incorrect for this DBCC statement.

Any idea whats going wrong?

  • 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-10T21:52:49+00:00Added an answer on June 10, 2026 at 9:52 pm

    In SQL Server, you could save the IDENT_CURRENT value in a variable, like this:

    DECLARE @currentIdentity INT;
    SELECT @currentIdentity = IDENT_CURRENT('MyTable');
    DBCC CHECKIDENT (MyTable, reseed, @currentIdentity);
    

    To answer your question, your problem is that Current_Identity is an alias to a column, but you did not store it anywhere. This means that the next call you make to DBCC CHECKIDENT cannot reference the column from the previous query.

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

Sidebar

Related Questions

Trying to pull a value from the sunrise element from [yweather:astronomy] in the Yahoo
i'm trying to use powershell to take image from specified url and resend it
Trying to figure out how I can do this properly. The print_r looks like
Trying to read registry keys remotly (from a host on local intranet)... All the
I'm trying to subclass an unmanaged statusbar window from my managed COM server using
Trying to use log4j's built-in JMSAppender to log messages to a local message queue
Trying to execute a Powershell cmdlet from a MVC 3 Controller using impersonation but
Trying to build Wireshark from source as there is no Linux installer and I
I am trying to send data through DatagramSocket and would like to do this
I am trying to use a click event to generate a popup window based

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.