Edit/update “Cell is readonly” in MS SQL

3 Sep

If you want to update a cell which is an identity column, you need to do the following:

set identity_insert TABLEX ON;
insert into TABLEX (COLUMNX) values (NN);
delete from TABLEX where COLUMNX = OLDNN
set identity_insert TABLEX OFF;

Read more:






Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: