4-Jun-14 (Created: 4-Jun-14) | More in 'control files'

akc-gen-sql-server-stored-proc-template.html

Creating the stored proc: {{:procname}}

 
/* 
*************************************************
* {{:procname}}
* {{:comment}}
*************************************************
*/
USE [your-database-name-goes-here. ex: test]
GO

/*
****************************************************
* Drop the proc
****************************************************
*/
if exists (select * from sysobjects 
    where id = object_id(N'[dbo].[{{:procname}}]') 
    and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[{{:procname}}]
GO

/*
****************************************************
* Create the proc
****************************************************
*/
CREATE PROCEDURE dbo.{{:procname}}
{{for attributes}}
    @{{:name}} {{:type}},
{{/for}}
    @ownerUserId
as begin

{{:stmt}}

/*
****************************************************
* End of the proc
****************************************************
*/
end

/* End of the proc and go */
go

You can also make use this database knowledge folder

If you have permissions you can see and update this template

If you just want to see the template