Wednesday, July 13, 2011

How To Drop and Rename An Index

How to rename an index in SQL Server 2008 R2 by using Transact-SQL. Renaming an index means it replaces the current index name with the new name that you provide.

Use this script for dropping Index
DROP INDEX indexname
ON dbo.tablename;

Use this script for Renaming Index
EXEC sp_rename N'dbo.tablename.indexname', N'newname_indexname', N'INDEX';
SQL DROP INDEX, DROP TABLE, DROP DATABASE, drop index statement, sqlite drop index, drop index if exists, drop index sql server 2008, drop index sql server 2012, drop index sql server 2005, how to drop index in sql server, Rename Indexes, Renaming an Index, SQL Server Indexes, how to rename indexes in sql server 2008 r2, 2012, 2005, Renaming SQL Server objects, renaming indexes example, sql server 2008 index names, sql server 2012 index names, rename index sql server 2012, How do I rename an Index,


Post a Comment