Is it possible to both alter a column and add a new column in the same alter table query for MSQL? I've tried looking at the below MSDN article, but it was a bit confusing to understand. I could easily do it with multiple queries, but would rather do it with one query if possible. Thanks.
+1
A:
no you need to do it in separate batches
create table test(id int)
go
alter table Test add id2 int
go
alter table Test ALTER COLUMN id DECIMAL (5, 2)
you can however add more than 1 column at a time
alter table Test add id3 int, id4 int
go
SQLMenace
2010-03-01 19:08:34
Thanks. That was kinda what I was finding in my searching.
Fred Clown
2010-03-01 19:12:40