December 2013
Intermediate to advanced
1872 pages
153h 31m
English
User-defined functions in SQL Server 2012 allow you to create reusable routines that can help make your SQL code more straightforward and efficient.
In this chapter, you saw how to create and modify scalar functions and inline and multistatement table-valued functions and how to invoke and use them in queries. Scalar functions can be used to perform more complex operations than those provided by the built-in scalar functions. Table-valued functions provide a way to create what are essentially parameterized views, and you can include them inline in your queries, just as you would in a table or view.
With the introduction of CLR-based functions, SQL Server 2012 greatly increases the power and capabilities of user-defined functions, and ...