Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 2.39 KB

File metadata and controls

40 lines (32 loc) · 2.39 KB
title CLR User-Defined Functions | Microsoft Docs
description SQL Server CLR integration allows you to create user-defined scalar-valued, table-valued, and aggregate functions in any .NET Framework programming language.
ms.custom
ms.date 03/14/2017
ms.prod sql
ms.reviewer
ms.technology clr
ms.topic reference
helpviewer_keywords
building database objects [CLR integration], user-defined functions
functions [CLR integration]
common language runtime [SQL Server], user-defined functions
database objects [CLR integration], user-defined functions
user-defined functions [CLR integration]
ms.assetid 6f7491f1-9a46-4146-ae09-056248634de2
author rothja
ms.author jroth

CLR User-Defined Functions

[!INCLUDE SQL Server] User-defined functions are routines that can take parameters, perform calculations or other actions, and return a result. Beginning with [!INCLUDEssVersion2005], you can write user-defined functions in any [!INCLUDEmsCoName] .NET Framework programming language, such as [!INCLUDEmsCoName] Visual Basic .NET or [!INCLUDEmsCoName] Visual C#.

There are two types of functions: scalar, which returns a single value, and table-valued, which returns a set of rows.

The following table lists the topics in this section.

CLR Scalar-Valued Functions
Covers implementation requirements and examples of scalar-valued functions.

CLR Table-Valued Functions
Discusses how to implement and use table-valued functions (TVFs), as well as differences between [!INCLUDEtsql] and common language runtime (CLR) TVFs.

CLR User-Defined Aggregates
Describes how to implement and use user-defined aggregates.

See Also

User-Defined Functions