How to change the datatype of column without deleting it indexes; I am looking for changing the datatype of a field from nvchar(20) to nvchar(MAX), but it retains the below message.
my questions here:
Deleting the index will affect on the data?
Can I restore the index after deleting it and changing the data type?
Is The index in the screenshot below the only index that will be deleted?
I will be very appreciated for any help :)
Best,
Lubna
The data type of columns included in an index cannot be changed unless
the column is a varchar, nvarchar, or varbinary data type, and the new
size is equal to or larger than the old size.

With this info from the knowledge base a suggestion could be to alter column to a nvarchar(4000) or something like that.
Remember that you can't index a varchar(max) or nvarchar(max) field.