I have a new database server and I created a new database and now I'm trying to run a script that's supposed to create all the tables from the previous database server. The script is an accumulation of various changes I have made to the old database since
the start of the project in order to implement a variety of features, so it has this pattern:
ALTER TABLE X DROP COLUMN Y;
and later in the file:
ALTER TABLE X ADD Y int NOT NULL;
When I run the script, I get a duplicate column error message for the table and field, although I first dropped the column and then added it again. I suppose I have to do some kind of flash after the drop and before the add, but isn't the GO supposed to
do that? If not, how can I flash it in the script?
View Complete Post