Showing posts with label towork. Show all posts
Showing posts with label towork. Show all posts

Sunday, March 11, 2012

alter table

Can you do more than one alter table alter column in one
statement? For example, I could not get the following to
work unless I did one column at a time:
alter table testalter
alter column f1 varchar(10) null,
f2 varchar(50) null,
f3 varchar(30) null
Joe,
No.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"JoeMan" <anonymous@.discussions.microsoft.com> wrote in message
news:1c37201c4217c$c827f660$a101280a@.phx.gbl...
> Can you do more than one alter table alter column in one
> statement? For example, I could not get the following to
> work unless I did one column at a time:
> alter table testalter
> alter column f1 varchar(10) null,
> f2 varchar(50) null,
> f3 varchar(30) null
|||No, you can only send one command per ALTER TABLE statement (ADD, ALTER
COLUMN, DROP, DROP CONSTRAINT, etc).
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"JoeMan" <anonymous@.discussions.microsoft.com> wrote in message
news:1c37201c4217c$c827f660$a101280a@.phx.gbl...
> Can you do more than one alter table alter column in one
> statement? For example, I could not get the following to
> work unless I did one column at a time:
> alter table testalter
> alter column f1 varchar(10) null,
> f2 varchar(50) null,
> f3 varchar(30) null

alter table

Can you do more than one alter table alter column in one
statement? For example, I could not get the following to
work unless I did one column at a time:
alter table testalter
alter column f1 varchar(10) null,
f2 varchar(50) null,
f3 varchar(30) nullJoe,
No.
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"JoeMan" <anonymous@.discussions.microsoft.com> wrote in message
news:1c37201c4217c$c827f660$a101280a@.phx
.gbl...
> Can you do more than one alter table alter column in one
> statement? For example, I could not get the following to
> work unless I did one column at a time:
> alter table testalter
> alter column f1 varchar(10) null,
> f2 varchar(50) null,
> f3 varchar(30) null|||No, you can only send one command per ALTER TABLE statement (ADD, ALTER
COLUMN, DROP, DROP CONSTRAINT, etc).
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"JoeMan" <anonymous@.discussions.microsoft.com> wrote in message
news:1c37201c4217c$c827f660$a101280a@.phx
.gbl...
> Can you do more than one alter table alter column in one
> statement? For example, I could not get the following to
> work unless I did one column at a time:
> alter table testalter
> alter column f1 varchar(10) null,
> f2 varchar(50) null,
> f3 varchar(30) null