ReTurn data Use data sets SQL Server


show more Returning data using data sets provides you with in-depth training on Business. Taught by Martin Guidry as part of the SQL Server: Triggers, Stored Procedures, and Functions show less
please wait ...

Returning data using data sets

Now I'd like to talk about returning data through stored procedures, specifically returning data as datasets primarily. We'll also talk a little bit about a return value. I have some code on the screen here that is available in our exercise files. This is very similar to what we were doing in the previous section. It's code that allows us to modify a stored procedure and execute that stored procedure. I'm going to modify the stored procedure to have a return value. So at the end, the very last thing before the end statement, I will simply issue the keyword Return, and give it a numeral.

So in this case, Return 1. When we execute that, we will likely not see that one returned just yet, we have to go through a little more effort to actually see what is returned. We will declare a variable to hold that value. We will then execute the stored procedure, and take what is returned, and store it in our newly created variable, and then we'll need one last line of code to displa...

Returning data using data sets
Video duration: 3m 45s 1h 52m Advanced

Viewers:

Returning data using data sets provides you with in-depth training on Business. Taught by Martin Guidry as part of the SQL Server: Triggers, Stored Procedures, and Functions

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