CLR integration

You probably noticed that the two spatial data types are implemented as CLR data types. The spatial data types are shipped with SQL Server; therefore, Microsoft developers created them. However, you can also create your own CLR data types. SQL Server featured CLR inside the database engine for the first time in the 2005 version.

You can create the following CLR objects in a SQL Server database:

  • User-defined functions
  • Stored procedures
  • Triggers
  • User-defined aggregate functions
  • User-defined data types

You can use CLR objects to extend the functionality of the Transact-SQL language. You should use CLR for objects that you can't create in Transact-SQL, such as user-defined aggregates or user-defined data types. For objects that ...

Get SQL Server 2017 Developer's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.