Join Martin Guidry for an in-depth discussion in this video Returning data using data sets, part of SQL Server: Triggers, Stored Procedures, and Functions.
- View Offline
- Exercise Files
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…display that returned value.…
- Comparing triggers, functions, and stored procedures
- Installing and configuring SQL Server
- Creating a stored procedure
- Returning data using data sets
- Creating user-defined functions
- Using "after," "instead," and nested triggers
- Modifying existing stored procedures
- Implementing logging on DELETE
- Choosing between T-SQL and CLR
- Executing a stored procedure
- Passing parameters
Skill Level Advanced
1. Getting Started
2. Installing SQL Server
Configuring your environment4m 53s
3. Stored Procedures
4. User-Defined Functions
6. Putting It All Together
7. Using CLR Assemblies
8. Exploring an ASP.NET Web Application
Next steps1m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.