SQL Tutorials

How To Create Stored Procedure Using SQL Server Management Studio

How To Create Stored Procedure Using SQL Server Management Studio

Description:

This article explains how to create SQL stored Procedure using SQL Server Management Studio.

Requirements:

Need permisson to create Peocedure on the database and ALTER permsission on the schema.

How To Create Stored Procedure Using SQL Server Management Studio
Steps:

– Connect the Server instace of Database Engine.

– Expand the database and now selecte Progrannability.

– Now Right click on the Stored Procedures and select New Stored Procedure.

– Go to Query menu and specify the values for create Template Parameters.

– In specify Values for Template Paraments enter the values specified.Like Author,Create Date,Descrition….etc.

– Then click on ok.Go to Query window and update the below Select statement.

SELECT FirstName, LastName, Department
FROM development.vEmpHistory
WHERE FirstName = @FirstName AND LastName = @LastName
    AND EndDate IS NULL;

– Select the query and click on Execute so procedure will create on the database.

– To view the created Procedure right click on stored Procedures and refresh it.

– For execute the create stored procedure right click and select Execute Stored Procedure.

Tags:Sql,Ms SQl,Stored Procedure,Query window,Select query,Transact-SQL,SQL Server Management Studio.

About the author

admin

1 Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Superb post however , I was wanting to know if you could write a litte more on this topic?

    I’d be very thankful if you could elaborate a little bit more.

    Appreciate it!