Sunday, January 7, 2018

No CREATE OR ALTER before Microsoft SQL Server 2016 SP1

In one of the applications that I am working on, there was a stored procedure pushed in by a fellow developer as follows.
ALTER PROCEDURE [someSchema].[someProcedureName]
//--implementation
Since I didn’t have the procedure in my local Microsoft SQL Server database, I have changed the procedure with following and pushed back.
CREATE OR ALTER PROCEDURE [someSchema].[someProcedureName]
//--implementation
The change is I have made is from ALTER PROCEDURE to CREATE OR ALTER PROCEDURE. Then to my surprise got to know that, the stored procedure is breaking on my fellow developer's environment. He was having Microsoft SQL Server 2014 and I am on Microsoft SQL Server 2017.

Did some googling and got to know that CREATE OR ALTER was introduced with as part of Microsoft SQL Server 2016 SP1 enhancements.

For more  information read the following post,
Developers Choice: CREATE OR ALTER

Happy Coding.

Regards,
Jaliya

No comments:

Post a Comment