CREATE OR ALTER PROCEDURE - by JanDV

Status : 

 


15
0
Sign in
to vote
ID 448946 Comments
Status Active Workarounds
Type Suggestion Repros 0
Opened 5/13/2009 12:16:24 AM
Access Restriction Public
Primary Feedback Item 127219

Description

Hi,

In SQL Server we can ALTER a procedure/view/function, etc... if it already exists, keeping the same object_id and as a consequence the same rights. If the object doesn't exists we CREATE.

The result of that is that in installation scripts that should be agnostic to a version of the object already being present we face the choice between dropping the object first if it exists and recreating it and redefining the rights on it, or maintaining the code of the object 2 times in the script (IF OBJECT_ID('something') IS NULL CREATE ... ELSE ALTER ...

Why not have a CREATE OR ALTER PROCEDURE statement that alters if it exist and creates if it doesn't exist?
Sign in to post a comment.
Posted by Levente0xFFFD on 8/8/2014 at 6:58 AM
Cannot open the mentioned feedback below. It says:
"The system has encountered an unexpected error. We apologize for the inconvenience. The issue will be addressed as quickly as possible. "
This is at least since 3/27/2014. See: https://connect.microsoft.com/SQLServer/feedbackdetail/view/344991
Posted by Umachandar [MSFT] on 3/24/2010 at 1:36 PM
Hi,
I have resolved the request as duplicate of feedback item below:

https://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=127219&wa=wsignin1.0

--
Umachandar, SQL Programmability Team

Posted by Umachandar [MSFT] on 3/24/2010 at 1:36 PM
Hi,
I have resolved the request as duplicate of feedback item below:

https://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=127219&wa=wsignin1.0

--
Umachandar, SQL Programmability Team

Posted by Jim [MSFT] on 6/2/2009 at 4:44 PM
Hi,

Thanks for this request. It's on our list of candidate features for next release. All being well, I'll be updating the spec fairly soon.

Jim Hogg
Posted by AaronBertrand on 5/19/2009 at 9:39 AM
This is a duplicate, please vote for the original to avoid diluting the votes, thanks.

http://connect.microsoft.com/SQL/feedback/ViewFeedback.aspx?FeedbackID=127219