I’m using Sql-Server, and I have the below query which returns all columns that have a collation other than ‘SQL_Latin1_General_CP1_CI_AS’
select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS
where COLLATION_NAME <> 'SQL_Latin1_General_CP1_CI_AS'
and COLLATION_NAME is not null;
I need to get also the Indexes on these columns so I can drop these indexes, modify columns, then recreate them.
My problem that I don’t know how to get the indexes names for the columns returned from the query above.
see if this helps you: