I need to change table's identity column to just be int column. Can someone
shed a light? Thanks,
DDL:
alter table mytable
alter column IdentFld intThere is not a simple way of doing this. You have to add a new column, copy
data from identity one, drop foreign key constraints referencing the identit
y
column, drop the identity column, rename new column, add foreign key
constraints, etc.
AMB
"Sean" wrote:
> I need to change table's identity column to just be int column. Can someon
e
> shed a light? Thanks,
> DDL:
> alter table mytable
> alter column IdentFld int
>|||Thank you for your reply. It is very useful. I didn't know it's been that ha
rd.
"Alejandro Mesa" wrote:
> There is not a simple way of doing this. You have to add a new column, cop
y
> data from identity one, drop foreign key constraints referencing the ident
ity
> column, drop the identity column, rename new column, add foreign key
> constraints, etc.
>
> AMB
>
> "Sean" wrote:
>|||...or do it inside Enterprise Manager.
It does the same work as Alejandro explained though.
"Sean" <Sean@.discussions.microsoft.com> wrote in message
news:78C1A0BA-47E6-4EBF-9051-8F9E26A89FCB@.microsoft.com...
> Thank you for your reply. It is very useful. I didn't know it's been that
> hard.
> "Alejandro Mesa" wrote:
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment