I have a table
CREATE TABLE table1(
[classe] [char](30) NOT NULL,
[code] [char](30) NOT NULL,
[description] [varchar](255) NULL,
[codelangue] [char](2) NULL
) ON [PRIMARY]
with the index
CREATE NONCLUSTERED INDEX [table1_id1] ON [dbo].[table1]
(
[codelangue] ASC,
[classe] ASC,
[code] ASC
)
INCLUDE ( [description]) WITH (PAD_INDEX = OFF,
STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF,
IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
When I do
ALTER TABLE table1
ALTER COLUMN codelangue [char](2) NOT NULL
it drops the index and the associated statistique.
Any idea why?