Link to home
Start Free TrialLog in
Avatar of saturation
saturation

asked on

Drop index, alter column, Create Index

I need to drop indexes to alter some fields.   However, I need to rebuild those indexes just as they were before they were dropped.   Some of my indexes have more than one field on them.   How do I ensure the indexes are re-created the same way they were before dropped?

DROP INDEX table_name.index_name
ALTER table_name ALTER COLUMN field_name nvarchar (x)
CREATE INDEX ????????
ASKER CERTIFIED SOLUTION
Avatar of natecudf
natecudf

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of saturation
saturation

ASKER

Is there a system stored procedure that will generate either of those from query analyzer and/or MGMT Studio?
Avatar of Anthony Perkins
No.  But as indicated you can use SSMS to create the appropriate scripts.
You can see the date time in SSMS (Created date for Index)