How to Create Stored Procedure in SQL-Server?

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.

Stored Procedure in SQL - SERVER and ASP.Net

Stored Procedure in SQL – SERVER and ASP.Net

STEP 4 – Right Click on the Stored Procedure folder Select “New Stored Procedure” Option.

Stored Procedure in SQL - SERVER and ASP.Net

Stored Procedure in SQL – SERVER and ASP.Net

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.

Stored Procedure in SQL - SERVER and ASP.Net

Stored Procedure in SQL – SERVER and ASP.Net

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…

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + 6 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">