CygNuS
Well-known member
Ok, i'm using SQL Server 2005 and i'm trying to change the datatype of 4 columns in ARTIKELS.
This works for a single column
But for all columns it doesn't:
This doesn't either:
Writing 4 seperate alter statements is not that much of a problem, but it would really be simpler for later adjustments if i could pull it off in one statement.
Weird thing is: ALTER TABLE ARTIKELS ADD and DROP COLUMN works with multiple columns, so why doesn't ALTER COLUMN?
Am i asking the impossible? I couldn't find anything on the web offering a proper solution.
This works for a single column
VB.NET:
ALTER TABLE [dbo].[ARTIKELS]
ALTER COLUMN [OMSN] nvarchar(200)
VB.NET:
ALTER TABLE [dbo].[ARTIKELS]
ALTER COLUMN [OMSN] nvarchar(200),
ALTER COLUMN [OMSF] nvarchar(200) NULL,
ALTER COLUMN [OMSE] nvarchar(200) NULL,
ALTER COLUMN [OMSD] nvarchar(200) NULL
VB.NET:
ALTER TABLE [dbo].[ARTIKELS]
ALTER COLUMN [OMSN] nvarchar(200),
[OMSF] nvarchar(200) NULL,
[OMSE] nvarchar(200) NULL,
[OMSD] nvarchar(200) NULL
Weird thing is: ALTER TABLE ARTIKELS ADD and DROP COLUMN works with multiple columns, so why doesn't ALTER COLUMN?
Am i asking the impossible? I couldn't find anything on the web offering a proper solution.
Last edited by a moderator: