If your sproc is named "Whatever" then...
IF OBJECT_ID(N'Whatever') IS NOT NULL
BEGIN
PRINT 'We are renaming Whatever.'
EXEC sp_rename 'Whatever', 'SomethingElse'
END
ELSE
BEGIN
PRINT 'Whatever does not exist and will not be renamed.'
END
GO
No comments:
Post a Comment