Has anybody ever tried to do this. I can't figure it out. All I want to do is take an existing table that already has values in the column that I want to change and add the identity property to yes and set the identity seed and increment to a specific number. I know you can do it in the CREATE TABLE statement but is there a way to use the ALTER TABLE command?Create a new table with same schema and the Identity column, then load the data into the new table, and then drop the old table.|||i don't think so. even when you trying to remove the identity from a table, it will drop and recreate the table in the backgound. it can't just
modify the table structure.
Originally posted by randyfoy
Has anybody ever tried to do this. I can't figure it out. All I want to do is take an existing table that already has values in the column that I want to change and add the identity property to yes and set the identity seed and increment to a specific number. I know you can do it in the CREATE TABLE statement but is there a way to use the ALTER TABLE command?|||even though I can just go to the design view of the table through the Enterprise Manager and change the property? It works fine if I do it manually.|||and try to run profiler while you're doing it, guess you'd answer your own question
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment