I normally use the following code in SQL Server:
IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[proc_MyProc]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[proc_MyProc]
GO
How do I do this in SQL Azure? I get an error message: "Invalid object name 'sysobjects'."
Added:
The error was in fact in the checking if the stored procedure existed and have found code to do this:
IF EXISTS (SELECT Routine_Name from information_schema.Routines WHERE Routine_Name = 'proc_MyProc')
DROP PROCEDURE [proc_MyProc]
GO