How to create store procedure for insert data in database table in sql server.

How to create store procedure for insert data in database table in sql server.

I am going to explain how to create store procedure for insert data in table in sql server 2008.This is simple to create store procedure in sql server.

1

For create store procedure in sql server
1.Open Microsoft SQL Server Studio
2.Open DataBase where you want to create store procedure.See below-

2

After select Database then open Programmabilty and right click on StoreProcedure and click on New Store procedure-See below

3

Then new query tab will open in right side,Remove all content from this tab.See below

4

Then write the query as below-

CREATE PROCEDURE sp_InsertEmp
(
@ID int,
@Name varchar(50),
@Address varchar(50)
)
As
Insert INTO tbEmp (ID,Name,Address) VALUES(@ID,@Name,@Address)

About the author

admin administrator

Leave a Reply