We have a column with an IDENTITY attribute and we no longer want this
column to have the IDENTITY attribute.
I know that set IDENTITY_INSERT will more or less ignore the IDENTITY for
that unit of work however I need the IDENTITY attribute totally removed so
that we don't have to set IDENTITY_INSERT each time.
Thanks in advanceYou can add a new column, copy the contents of the identity column to it,
drop the identity column, and rename the new column.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"TJT" <TJT@.nospam.com> wrote in message
news:egxy3DYXGHA.1200@.TK2MSFTNGP03.phx.gbl...
We have a column with an IDENTITY attribute and we no longer want this
column to have the IDENTITY attribute.
I know that set IDENTITY_INSERT will more or less ignore the IDENTITY for
that unit of work however I need the IDENTITY attribute totally removed so
that we don't have to set IDENTITY_INSERT each time.
Thanks in advance
Showing posts with label attribute. Show all posts
Showing posts with label attribute. Show all posts
Monday, March 19, 2012
is it possible to alter a table to remove IDENTITY attribute
We have a column with an IDENTITY attribute and we no longer want this
column to have the IDENTITY attribute.
I know that set IDENTITY_INSERT will more or less ignore the IDENTITY for
that unit of work however I need the IDENTITY attribute totally removed so
that we don't have to set IDENTITY_INSERT each time.
Thanks in advanceYou can add a new column, copy the contents of the identity column to it,
drop the identity column, and rename the new column.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"TJT" <TJT@.nospam.com> wrote in message
news:egxy3DYXGHA.1200@.TK2MSFTNGP03.phx.gbl...
We have a column with an IDENTITY attribute and we no longer want this
column to have the IDENTITY attribute.
I know that set IDENTITY_INSERT will more or less ignore the IDENTITY for
that unit of work however I need the IDENTITY attribute totally removed so
that we don't have to set IDENTITY_INSERT each time.
Thanks in advance
column to have the IDENTITY attribute.
I know that set IDENTITY_INSERT will more or less ignore the IDENTITY for
that unit of work however I need the IDENTITY attribute totally removed so
that we don't have to set IDENTITY_INSERT each time.
Thanks in advanceYou can add a new column, copy the contents of the identity column to it,
drop the identity column, and rename the new column.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
"TJT" <TJT@.nospam.com> wrote in message
news:egxy3DYXGHA.1200@.TK2MSFTNGP03.phx.gbl...
We have a column with an IDENTITY attribute and we no longer want this
column to have the IDENTITY attribute.
I know that set IDENTITY_INSERT will more or less ignore the IDENTITY for
that unit of work however I need the IDENTITY attribute totally removed so
that we don't have to set IDENTITY_INSERT each time.
Thanks in advance
Subscribe to:
Posts (Atom)