重命名存储过程

示例如下

示例将创建 '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';
上一篇:【DB笔试面试604】在Oracle中,存储概要(Stored Outline)的作用是什么?


下一篇:存储过程(Stored Procedure)