How to Create a Stored Procedure

To create a stored procedure, use the Create Procedure statement, which has the following syntax:

Create PROCEDURE [owner.]procedure_name [;number][(@parameter1 data_type [VARYING]
 [=default] [OUTPUT] [,@parameter2]... [@parameter1024])] [{FOR REPLICATION} | {WITH
 RECOMPILE} [{[WITH]|[,]}ENCRYPTION]] As SQL Statements

TIP

Use the Stored Procedure Wizard found in Enterprise Manager to create INSERT, DELETE, UPDATE statements for a stored procedure. To access the wizard, click the Run a Wizard toolbar button. Next ...

Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.