I am writing a SQL Server stored procedure for the first time and am unclear on how I can “save” my stored procedure so that it appears under Programmability, Stored Procedures in the Object tree.
I am writing a SQL Server stored procedure for the first time and am
Share
The CREATE PROCEDURE procedureName statement creates the procedure.
You just need to execute it once and it will save the procedure to your database.
Make sure to select the correct database you want to save the procedure to, either by selecting it in the top left hand corner of SQL Server Management Studio, or by putting the following at the top of your code:
USE databaseName
Also note, if there are any syntax errors, it won’t “save” the procedure.