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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:08:39+00:00 2026-05-30T17:08:39+00:00

Using SQL Server 2008 R2, I have a Users table, in which I would

  • 0

Using SQL Server 2008 R2, I have a Users table, in which I would like to reserve the top 99 ID values for manual-entry system users. I have set my identity seed to 100, so that all new users will be given a value 100+ in normal behavior. I found that I can use SET IDENTITY_INSERT to suppress the identity specification and provide an explicit value for this column. What I need to know, and could not really understand from MSDN, is if this suppression will only apply to the context of the running script. (i.e., new users created on the site, calling the normal insert proc, will still be given autogenerated ID of next value > 100)

  • 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-30T17:08:40+00:00Added an answer on May 30, 2026 at 5:08 pm

    SET IDENTITY_INSERT allows you to directly insert an identity value, it doesn’t require it. So, even if it were a shared setting, running your “normal” INSERT would get an auto-generated identity.

    That said, it is a per-session setting as well, so you’re doubly safe.

    As to the design – I’ve done similar, and don’t see an issue with it. Having “well-known” identifiers is fairly common – though you’ll have to decide whether 100 is an appropriate block to reserve. Though possible, you really don’t want to have to open a non-contiguous block at a later time. I’ve used negative numbers in the past when there wasn’t a reserved range.

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

Sidebar

Related Questions

I'm using SQL Server 2008 and I have a table with three columns: Length
I'm using SQL Server 2008. I have a table with over 3 million records,
I am using SQL Server 2008. I have a table (TBL_FILE) that stores user
I'm using SQL Server 2008 Management studio viewing a 2005 server and have just
I am using SQL Server 2008 Enterprise. I have created a very simple test
Background: I'm using SQL Server Management Studio 2008 and I have a query window
I have a database that I have created using SQL Server Developer 2008. I
I have an asp.net web application written in C# using a SQL Server 2008
Ok, I'm using SQL Server Express 2008 and .Net 3.5 (c#) I have a
Using SQL Server 2008, is there a way to allow inserts to a table

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.