Database Table Alteration
August 20, 2010 Leave a comment
· build a new table to the correct specification
· migrate the data from the old table to the new.
· drop all the constraints against the original table
· recreate all the constraints against the new table
· drop the original table
· rename the new table to the original name
So GUI does all the grunt work behind the scene. So the suggested way is, we have to use “Query” to accompish that type of task.
ALTER TABLE [Table1] ALTER COLUMN [col_id] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY
This will save our time and do not affect the table’s existing constraint.
Hope this info may help u…