9 questions for “User Defined Functions”

Found in 1 field. Select a question to see its full answer.

Information Technology

9 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is a user defined function in SQL Server, and why would you create one instead of repeating the same logic in multiple queries? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsBeginner
2Why can calling a scalar user defined function within a query against a large table cause significant performance problems? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsIntermediate
3What restrictions exist on what a user defined function is allowed to do compared to a stored procedure? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsIntermediate
4What are the tradeoffs between implementing complex reusable business logic as a user defined function versus building it directly into application code? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsAdvanced
5How would you design a set of reusable functions for a data warehouse to standardize common calculations like currency conversion or fiscal period determination? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsAdvanced
6What is the difference between an inline table valued function and a multi statement table valued function? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsBeginner
7What improvements did SQL Server 2019 introduce for scalar function performance through a feature called scalar UDF inlining? SQL Server › User Defined FunctionsSQL ServerUser Defined FunctionsIntermediate
8What is the difference between a scalar function and a table valued function in SQL Server? SQL Server › Stored Procedures & FunctionsSQL ServerStored Procedures & FunctionsBeginner
9What are the main differences between a stored procedure and a function in terms of what each one can and cannot do? SQL Server › Stored Procedures & FunctionsSQL ServerStored Procedures & FunctionsIntermediate