Home Dashboard Directory Help
Search

CREATE OR ALTER PROCEDURE by JanDV


Status: 

Active


13
0
Sign in
to vote
Type: Suggestion
ID: 448946
Opened: 5/13/2009 12:16:24 AM
Access Restriction: Public
Primary Feedback Item: 127219
0
Workaround(s)
view

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?
Details
Sign in to post a comment.
Posted by Microsoft 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 Microsoft 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 Microsoft 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
Sign in to post a workaround.