lunes, 16 de mayo de 2016

SQL SERVER: crear o reemplazar stored procedure

IF object_id(N'[dbo].[EnviarMails_Auditoria]', 'p') IS NULL
    EXEC ('create procedure EnviarMails_Auditoria as select 1')
GO
ALTER PROCEDURE EnviarMails_Auditoria
AS
SELECT 2
GO