Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Remove Identity feature of a field

Author  Topic 

himithun
Starting Member

3 Posts

Posted - 2005-09-13 : 09:28:29
I have a table 5-6 fields. One of them is set with Identity feature. I am looking for some SQL command through which I can remove the Identity feature of that field.

Regards
Mithun

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-13 : 09:34:56
I think you need to remove it from EnterPrise Manager
In SQL Command, you need to

create new column of int type
update it with the values of identity field
drop identity field
rename new column as that of identity column


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

himithun
Starting Member

3 Posts

Posted - 2005-09-13 : 09:47:06
quote:
Originally posted by madhivanan

I think you need to remove it from EnterPrise Manager
In SQL Command, you need to

create new column of int type
update it with the values of identity field
drop identity field
rename new column as that of identity column


Madhivanan

Failing to plan is Planning to fail



Hi

Thanks for reply.
I know this is possible from Enterprise Manager but I am looking for some SQL command to do the task.

The table is blank.

The steps I would like to follow is as follows

1. Disable the Identity feature
2. Restore the data
3. Then again enable the Identity feature.

Regards
Mithun
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2005-09-13 : 09:48:35
go to EM and change it there. then before you save your changes press the button script changes and you'll see what you have to do in QA.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

himithun
Starting Member

3 Posts

Posted - 2005-09-13 : 10:22:18
quote:
Originally posted by spirit1

go to EM and change it there. then before you save your changes press the button script changes and you'll see what you have to do in QA.

Go with the flow & have fun! Else fight the flow



Hi

Thanks. It worked and purpose is served. Thank you very much.

Regards
Mithun
Go to Top of Page
   

- Advertisement -