Professional Documents
Culture Documents
3 Functions
3 Functions
Types of Functions
What Is a Scalar Function?
What Is an Inline Table-Valued Function?
What Is a Multi-Statement Table-Valued Function?
Practice: Creating Functions
Types of Functions
Scalar functions
Similar to a built-in function
Return a single value
Inline table-valued functions
Similar to a view with parameters
Return a table as the result of single SELECT statement
Multi-statement table-valued functions
Similar to a stored procedure
Return a new table as the result of multi statements
What Is a Scalar Function?
where region=@region)