Unanswered: Microsoft SQL Server Management Studio Question
I am new to writing stored procedures and this will be my first stored procedure written with Microsoft SQL Server Management Studio. I am familiar with working with VS 2010 and I have noticed that the IDE is very different. So, let's start with the basics. How do I go about adding a new stored procedure into the group of stores procedures that the project currently has. I already know that name and the T-SQL code I need. I just need to put it.
Ok ,Also you can use alter instead create if already exist and you want to make update ,But without any thing the sql server engine automatically replace create to alter ,Show example below for details
ALTER PROCEDURE [dbo].[UpdateQuery]
SET NOCOUNT OFF;
SET OrgContent = @OrgContent
WHERE (ID = @Original_ID);
SELECT ID, URL, OrgContent FROM StaffList WHERE (ID = @ID)
In SSMS, Click on File > New > Database Engine Query,
A dialog box will open, You need to enter server details and login credentials.
After successfully logging in, You will get a query window.
Select your database from the drop down below the menu bar.
Paste your create procedure/alter procedure code in that window (as suggested above)
Click on Query>Execute or simply press F5.
Your procedure will be created.
To verify, Right click your database, click Refresh.
Expand Programmability > Stored Procedures
You should see your newly created proc there.