The CREATE PROCEDURE
command is used to create a stored procedure.
A stored procedure is a prepared SQL code that you can save, so the code can be reused over and over again.
The following SQL creates a stored procedure named "SelectAllCustomers" that selects all records from the "Customers" table:
CREATE PROCEDURE SelectAllCustomers
AS
SELECT * FROM Customers
GO;
Execute the stored procedure above as follows:
EXEC SelectAllCustomers;
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!