Some tips for using User-Defined Functions in SQL Server 2016 Use scalar user-defined functions when you need to do the same mathematical calculations at multiple places in code. For example, if you need to calculate the factorial for the given number, you can write appropriate scalar user-defined function to encapsulate code for reuse. Consider using CLR user-defined functions. The CLR […]
Tag: scalar udf
Tips for using User-Defined Functions in SQL Server 2014
Tips for using User-Defined Functions in SQL Server 2014 Try to avoid using nested user-defined functions. Because using nested user-defined functions can result in some performance degradation, try to break down a nested function into simpler functions. Consider using CLR user-defined functions. The CLR user-defined functions were first introduced in SQL Server 2005. You can write the user-defined functions in...