sql server script that will change column type, do an insert, then change it back
Posted on 2007-11-27
I have a database I am converting into another fomat. There is a sort number, and I want to make it unique in the new db. I want to alter my script to change the column from numberic(10,2) to int, and auto increment, then after my insert statement change it back to numberic(10,2)
alter table, set column to autoincrement
my sql statement, which works
alter table change sortorder to numeric (10,2)
How can I do this with code? Just the alter table lines?