In SQL Server there are certain things that are good to implement using T-SQL, but certain requirements of real world can be better implemented using CLR (Common Language Runtime). CLR is better over T-SQL when we want to do high mathematical calculations, or implement a code that involves nested loops or recursions. Database objects like stored procedure, triggers, functions etc…can be written in CLR. We can write the code using C# or VB. The example that I will be demonstrating here is implemented in C#.
[More]