2
How do I change 3 columns at the same time in the SQL SERVER table?
I want to change the COLLATION
, but it could be something else.
I tried to:
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 tried too:
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 that’s the only way it works:
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
?