How to Create Stored Procedure in SQL-Server?
Stored Procedure is write SQL Query in Specific format in SQL Server and call them from your application, instead of writing queries inside your program code.
Stored Procedures are precompiled Transact-SQL statements which is stored in a SQL Server database.
Stored procedure is a simple SQL Statement, which is precompiled.
STEP 1 – Open the SQL Server management studi0
STEP 2 – Create a New Database
STEP 3 – Expand the DataBase name, Select the Programmability folder —> Stored Procedure.
STEP 4 – Right Click on the Stored Procedure folder Select “New Stored Procedure” Option.
After Writing Stored Procedure Press F5 key to Execute / Save Stored Procedure.
Then Refresh the Stored Procedure Folder and you will see the new created stored procedure in SQL Server.
If you want to changes in Existing Stored Procedure,
Just Right Click the Created Stored Procedure and Select Modify Option to change the Stored Procedure…