Wednesday, August 22, 2012

Stored Procedure good practices

In every stored proc check if it already exists:

IF OBJECT_ID('MySproc') IS NOT NULL 
DROP PROC MySproc 
GO 
 
CREATE PROC MySproc 
AS 
BEGIN 
    ... 
END