Join Martin Guidry for an in-depth discussion in this video Exploring table value functions, part of SQL Server: Triggers, Stored Procedures, and Functions.
Now I'd like to talk about another type of function, what Microsoft calls a…Table-valued Function.…As the name implies, the results of this function will be an entire table.…I've a little code prepared for you in your exercise files, copy that over.…So the top starts off just like any other function.…We're going to create a function call it 'authors by status' and it will take…one input parameter.…Line 2 says what we are going to return, and we are going to return a table.…
And then lines 3 through 11 define that table.…So just like if you were creating a new table, you have to define all the…columns, give it a name, a data type and whether or not we allow nulls for…each particular field.…So it can be a lot of typing to get all this in because we have to define,…in a fair amount of detail of the entire table we want to define.…The meat of this starts on around line 13, and we see an INSERT statement.…So we defined a table. Right now that table is empty.…
In order for this to be useful, we have to insert something into that table.…
- 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.