mssqltips logo

Add a stored procedure in SSDT



By:

Overview

We've created a table and we could use a stored procedure to access any data that gets added to the table.

Explanation

Adding additional objects is just as easy as what we went through to add our table. Let's add a stored procedure to retrieve Team data. In the Solution Explorer, right click on the Futbol project and choose Add->Stored Procedure.

Add Stored Procedure

You will be presented with the Add New Item screen where you will name your stored procedure. Name the proc GetTeam and click Add.

Add GetTeam Procedure

Visual Studio will present a .sql script with template code for the stored procedure. I modify the template code and save my changes.

Save GetTeam Changes

Last Update: 7/22/2014




More SQL Server Solutions











Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name
*Email
Email me updates

Signup for our newsletter

I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.






download





get free sql tips

I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



Learn more about SQL Server tools