Chapter 6. User-Defined Functions

User-defined functions (UDFs) are routines that perform calculations/computations and return a value–scalar (singular) or table. Microsoft SQL Server 2000 introduced UDFs, which you developed with T-SQL and could incorporate in queries, computed columns, and constraints. SQL Server 2005 introduces common language runtime (CLR) integration, allowing you to develop UDFs–as well as other routines and objects–using a .NET language of your choice.

This chapter explores the types of UDFs that are supported by SQL Server: scalar-valued UDFs, which return a single value, and table-valued UDFs (inline and multiple-statement), which return ...

Get Inside Microsoft® SQL Server™ 2005 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.