Returns just one value from T-SQL code you write yourself. Currently a preview feature for Fabric warehouses plus SQL analytics endpoints; queries against tables may call one only when inlining is possible.
Also called scalar UDF.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains Scalar user-defined function in context, with comparison tables and the common traps.
Terms in this definition
- T-SQL
The dialect of SQL that Microsoft uses for Azure SQL and SQL Server. Azure Monitor logs are queried with KQL instead.
- Serverless
Compute tier for single Azure SQL databases that scales automatically, pauses when idle and charges by the second. It is offered in General Purpose and Hyperscale, not Business Critical, and reserved capacity does not apply.
Related terms
- Scalar UDF inlining
From compatibility level 150, intelligent query processing can replace an eligible scalar user-defined function with an equivalent expression or subquery inside the query that calls it. The optimiser can then cost it properly and consider a parallel plan.