重命名存储过程

示例如下

示例将创建 'HumanResources.uspGetAllEmployeesTest存储过程。 第二个示例将存储过程重命名为 HumanResources.uspEveryEmployeeTest

--Create the stored procedure.  
USE AdventureWorks2012;  
GO  

CREATE PROCEDURE HumanResources.uspGetAllEmployeesTest  
AS  
    SET NOCOUNT ON;  
    SELECT LastName, FirstName, Department  
    FROM HumanResources.vEmployeeDepartmentHistory;  
GO  
  
--Rename the stored procedure.  
EXEC sp_rename 'HumanResources.uspGetAllEmployeesTest', 'uspEveryEmployeeTest';
posted @ 2020-04-01 22:47  Vincent-yuan  阅读(842)  评论(0编辑  收藏  举报