You can define a user-defined function with a single statement or with multiple statements, as you will see later in this chapter in the "Creating and Dropping User-Defined Functions" section.
According to their return value, user-defined functions can be divided into three groups:
Scalar functions that return a single scalar value.
Table-valued functions that return a full result set, similar to a table.
Inline user-defined functions are a special case of table-valued user-defined functions, but they are limited to a single SELECT statement.
Scalar user-defined functions return a single value, and they can be used wherever an expression is accepted, such as
In the ...