Solved

Identity() Columns and Update Statements?

Posted on 2014-12-08
2
79 Views
Last Modified: 2014-12-08
One of my tables in SQL Server 2008 contains an Identity() Column. This same column is the primary key for this table. When this table executes an UPDATE statement....does the Identity() Column also create a new value? If this is the case, is there a way to prevent this?

Thanks!
0
Comment
Question by:BlakeMcKenna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 50

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40487056
No. The identity it's only generate a new ID for inserts not updates.
0
 

Author Closing Comment

by:BlakeMcKenna
ID: 40487067
Thank you Vitor!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
union query column need default text 2 22
sql query help 15 63
Database-Scoped Permissions 2 39
2008 to 2016 jump (SQL Server) 1 27
This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question