/* This form is based on what is extracted from SQL Enterprise Manager: */
/* Object: Stored Procedure MyProc Script Date: 09/13/1999 8:59:44 AM */ IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id('MyProc') AND sysstat & 0xf = 4) DROP PROCEDURE MyProc GO
CREATE PROCEDURE MyProc ( @param1 float, @param2 datetime, @param3 datetime, @param4 float OUTPUT ) AS /* Procedure: MyProc
Action: Description of MyProc goes here.
*/
-- Procedure statements go here.
GO
/* This is an alternate form using the PRINT statement: */ IF OBJECT_ID('ProcName') IS NOT NULL BEGIN DROP PROCEDURE ProcName IF OBJECT_ID('ProcName') IS NOT NULL PRINT '<<< FAILED DROPPING PROCEDURE ProcName >>>' ELSE PRINT '<<< DROPPED PROCEDURE ProcName >>>' END ;
CREATE PROCEDURE ProcName ( @param1 <datatype> = <default value> , @param2 <datatype> = <default value> ) AS
-- Name: -- Description: -- Developer:
--Enter procedure here.
GO
GRANT EXECUTE ON ProcName TO public GO
IF OBJECT_ID('ProcName') IS NOT NULL PRINT '<<< CREATED PROCEDURE ProcName >>>' ELSE PRINT '<<< FAILED CREATING PROCEDURE ProcName >>>' GO