4.4. Types of CLR Routines SQL Server 2005 CLR integration lets you build database objects using .NET languages. Once a .NET Framework assembly is registered with SQL Server, you can create CLR routines that can be used anywhere a T-SQL equivalent routine can be used. Table 4-3 describes the available CLR routines. Table 4-3. Types of CLR routinesDatabase object | .NET Framework assembly type | Description |
---|
Scalar-valued function | Public static method | A UDF that returns a single value. | Table-valued function | Public static method | A UDF that returns a table as the result set. | Stored procedure | Public static method | A routine that returns tabular result sets and messages to the client, invokes DDL and DML statements, and returns output parameters. | User-defined aggregate function | Class or structure | A UDA function that operates on values in a set of rows and returns a scalar. | User-defined type | Class or structure | Complex data types complete with methods that extend the scalar type system in SQL Server. | Trigger (DML and DDL) | Public static method | A type of stored procedure that automatically runs when a DML or DDL event occurs. |
|