AI Features

Scalar-Valued Functions

Learn how to create and call functions that return scalar values.

If built-in functions do not meet all of our needs, we can create custom functions with T-SQL. User-defined functions can accept zero or more parameters and return either a scalar value or a table. In this lesson, we’ll focus on scalar-valued functions, which are functions that return a single value.

Creating user-defined functions

New functions can be created using the ...