how to alter an identity column to a non-identity column

how to alter an identity column to a non-identity column

Post by Charles Y » Thu, 08 Nov 2001 12:11:35



Whether and How to do it with a simple alter table alter column statement?

Thanks,

-charles

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

how to alter an identity column to a non-identity column

Post by Tibor Karasz » Thu, 08 Nov 2001 17:00:33


Charles,

You can't. You have to re-create the table or add/drop columns. This is what EM does.

--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sql...


> Whether and How to do it with a simple alter table alter column statement?

> Thanks,

> -charles

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!


 
 
 

how to alter an identity column to a non-identity column

Post by Dejan Sark » Thu, 08 Nov 2001 17:09:52


Charles,

Quote:> Whether and How to do it with a simple alter table alter column statement?

unfortunately there is no simple way. You'll nave to create a new table and
copy existing rows to it. But maybe you would just like to insert few values
manually and leave the identity property? In this case you should chect the
Set Identity_Insert command.

--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.

 
 
 

how to alter an identity column to a non-identity column

Post by BP Margoli » Fri, 09 Nov 2001 09:15:47


Charles,

http://www.tsqlsolutions.com/Articles/Index.cfm?ArticleID=22080

-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


Quote:

> Whether and How to do it with a simple alter table alter column statement?

> Thanks,

> -charles

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!