Saturday, February 25, 2012

Alter column

what is the syntax for multiple column modifications ?

alter table abc
alter column x1 nvarchar(10) null

-- works

alter table abc
alter column x1 nvarchar(10) null,
alter column x2 nvarchar(10) null

-- doesn't work or do i have to use the alter table each time ?Want the lazy/easy way to script this?

Make your changes in Enterprise Manager, and then before you save click the icon to script out the changes. Copy the script, cancel your changes, and paster your script in Query Analyzer for editing.

No comments:

Post a Comment