I use database scripts where I check for the existence of a Stored Procedure then drop it then create it.
Which of the following would be more efficient for checking and dropping SPs
Option 1
IF EXISTS(SELECT * FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'[dbo].[myStoredProc]',N'P'))
DROP PROCEDURE dbo.myStoredProc;
Option 2
IF OBJECT_ID (N'dbo. myStoredProc',N'P') IS NOT NULL
DROP PROCEDURE dbo.myStoredProc;
I have decided to use the second one due to obvious reasons, is there any reason why I should go for the first option