重命名存储过程

示例如下

示例将创建 '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';

猜你喜欢

转载自www.cnblogs.com/Vincent-yuan/p/12616556.html