Create Stored Procedures in SQL Server 2008


show more Creating stored procedures provides you with in-depth training on Business. Taught by Simon Allardice as part of the SQL Server 2008 Essential Training show less
please wait ...

Creating stored procedures

The process of creating a stored procedure is quite similar to that of doing a function, or indeed of defining any procedure, function, or method in any other programming language. We're going to name it. We have to give it a name. We're going to define any parameters that it takes. We're going to actually describe what it does, which in our case will be run either a single SQL statement or even batches of T-SQL. And then return any values, describe what it is that gets sent back. So how do we do that? Well, luckily, SQL Server Management Studio has some helpers for us.

If I actually drill down into the database in which I want to create my stored procedure, I'll use AdventureWorksLT, I'll open up the Programmability section and we see that we have the Stored Procedures folder right beside the Functions folder. I'll open that guy up. I'll right-click the Stored Procedures folder and say New Stored Procedure. Again, we get a lot of boilerplate code. Just to make th...

Creating stored procedures
Video duration: 11m 23s 6h 54m Beginner

Viewers:

Creating stored procedures provides you with in-depth training on Business. Taught by Simon Allardice as part of the SQL Server 2008 Essential Training

Subjects:
Business Developer IT
Software:
SQL Server
Author:
please wait ...