Section 4.4. Types of CLR Routines


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 routines

Database 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.




Programming SQL Server 2005
Programming SQL Server 2005
ISBN: 0596004796
EAN: 2147483647
Year: 2007
Pages: 147
Authors: Bill Hamilton

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net