- sp_rename 'procedure_name1', 'procedure_name2'
- The current name of the stored procedure
- The new name of the stored procedure.
A stored procedure can be renamed. The new name should follow the rules for identifiers.
EXEC sp_rename 'spGetAvgGrade', 'spNewAvgGrade';
Caution: Changing any part of an object name could break scripts and stored procedures.
The object was renamed to 'spNewAvgGrade'.
In the above example we change the name of the stored procedure spGetAvgGrade to spNewAvgGrade.