Creates a stored procedure (a saved collection of Transact-SQL statements) that can take and return user-supplied parameters.Procedures can be created for permanent use or for temporary use within a user’s session (local temporary procedure) or for temporary use within all user’s sessions (global temporary procedure).
Stored procedures can also be created to run automatically when Microsoft® SQL Server™ starts.SyntaxCREATE PROC[EDURE] procedure_name [;number]
[
{@parameter data_type} [VARYING] [= default] [OUTPUT]
]
[,...n]
[WITH 
{
RECOMPILE 
| ENCRYPTION 
| RECOMPILE, ENCRYPTION
}
]
[FOR REPLICATION]
AS
sql_statement [...n]