How do I change 3 columns at the same time in the SQL SERVER table?
I want to change COLLATION
, but could be something else.
I tried:
ALTER TABLE dbo.SIX_POSTO
ALTER COLUMN VIS_DS VARCHAR(200) COLLATE Latin1_General_CI_AI NOT NULL,
ALTER COLUMN VIS_DS_OBSERVACAO VARCHAR(200) COLLATE Latin1_General_CI_AI
NULL,
ALTER COLUMN VIS_DS_ENDERECO VARCHAR(500) COLLATE Latin1_General_CI_AI
NULL
I've also tried:
ALTER TABLE dbo.SIX_POSTO
ALTER COLUMN VIS_DS VARCHAR(200) COLLATE Latin1_General_CI_AI NOT NULL,
COLUMN VIS_DS_OBSERVACAO VARCHAR(200) COLLATE Latin1_General_CI_AI NULL,
COLUMN VIS_DS_ENDERECO VARCHAR(500) COLLATE Latin1_General_CI_AI NULL
And also:
ALTER TABLE dbo.SIX_POSTO
ALTER COLUMN VIS_DS VARCHAR(200) COLLATE Latin1_General_CI_AI NOT NULL,
VIS_DS_OBSERVACAO VARCHAR(200) COLLATE Latin1_General_CI_AI NULL,
VIS_DS_ENDERECO VARCHAR(500) COLLATE Latin1_General_CI_AI NULL
But it only works like this:
ALTER TABLE dbo.SIX_POSTO
ALTER COLUMN VIS_DS VARCHAR(200) COLLATE Latin1_General_CI_AI NOT NULL
ALTER TABLE dbo.SIX_POSTO
ALTER COLUMN VIS_DS_OBSERVACAO VARCHAR(200) COLLATE Latin1_General_CI_AI
NULL
ALTER TABLE dbo.SIX_POSTO
ALTER COLUMN VIS_DS_ENDERECO VARCHAR(500) COLLATE Latin1_General_CI_AI
NULL
For each ALTER TABLE
there can only be one ALTER COLUMN
?