CREATE PROCEDURE Syntax : Create Procedure « Procedure Function « SQL Server / T-SQL Tutorial






The basic syntax for creating a stored procedure looks like this:
CREATE PROCEDURE procedure_name 
    [ { @parameter data_type }[ OUTPUT ]
    ] [ ,...n ]
 [ WITH 
    { RECOMPILE | ENCRYPTION } ]
AS sql_statement [ ...n ] >








21.7.Create Procedure
21.7.1.CREATE PROCEDURE Syntax
21.7.2.Creating a Stored Procedure
21.7.3.A CREATE PROC statement that uses an optional parameter
21.7.4.A CREATE PROC statement that includes three parameters
21.7.5.A CREATE PROC statement that uses an input and an output parameter
21.7.6.Using WITH RECOMPILE