Rename Statistics

You can rename a statistics object in SQL Server 2012 by using Transact-SQL

In This Topic

  • Before you begin:

    Limitations and Restrictions


  • To rename a statistics object, using:

    SQL Server Management Studio


Before You Begin

Limitations and Restrictions

By default, creating an index creates a statistic on the key columns of that index. Therefore, renaming the index automatically renames the statistics object, and vice versa.

Changing any part of an object name can break scripts and stored procedures. Instead of renaming, we recommend that you drop the statistics object and re-create it with the new name.



Requires ALTER permission on the table or view.

Arrow icon used with Back to Top link [Top]

Using Transact-SQL

To rename a statistics object

  1. In Object Explorer, connect to an instance of Database Engine.

  2. On the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click Execute.

    USE AdventureWorks2012;
    EXEC sp_rename N'AK_Employee_LoginID', N'AK_Emp_Login', N'STATISTICS'; 

For more information, see sp_rename (Transact-SQL).

Arrow icon used with Back to Top link [Top]