Increase all primary key values by 1 How do I increase all of my EmployeeID values by one if it is the primary key?
I assume that this question is about how to update a bunch of rows to a value on higher without stepping on each other. If you update id=1 to id=2 in the first row while the second row (with id=2) is still there you will get a primary key violation because now you have two rows with id=2. 

To prevent that type of collision you just need to start at the largest value and increase it by one. that opens up a gap for the second largest value to move into which in turn opens a gap for the third largest value to move into, and so on.

In SQL Server however, you need not worry, as the engine is taking care of that automatically:

SQL Fiddle

MS SQL Server 2008 Schema Setup:

CREATE TABLE dbo.Employee(Id INT PRIMARY KEY CLUSTERED, Name NVARCHAR(MAX));

INSERT INTO dbo.Employee(Id,Name)
VALUES(1,'John'),(2,'Jane'),(3,'Max');


Query 1:

SELECT * FROM dbo.Employee;


Results:

| ID | NAME |
|----|------|
|  1 | John |
|  2 | Jane |
|  3 |  Max |


Query 2:

UPDATE dbo.Employee
  SET Id = Id + 1;


Execution Plan

Query 3:

SELECT * FROM dbo.Employee;


Results:

| ID | NAME |
|----|------|
|  2 | John |
|  3 | Jane |
|  4 |  Max |


Query 4:

UPDATE dbo.Employee
  SET Id = Id - 1;


Execution Plan

Query 5:

SELECT * FROM dbo.Employee;


Results:

| ID | NAME |
|----|------|
|  1 | John |
|  2 | Jane |
|  3 |  Max |


If you actually follow the SQL Fiddle link, you can also see the execution plans for the two update statements. The first one looks like this:



There you can see fairly far to the left a Table Spool operator. That operator basically creates a copy of all rows that were updated before they get written back by the actual `Clustered Index Update' operator next to it. Because of this SQL Server is able to handle "overlapping" updates without tripping over itself.

An added benefit (and the original reason why this behavior was implemented) is that this two step approach provides Halloween Protection.