Solved

Identity() Columns and Update Statements?

Posted on 2014-12-08
2
77 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
2 Comments
 
LVL 48

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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