[1] Inline Functions Flashcards
1
Q
In what major way do Inline Functions differ from Views?
A
An Inline Function can take parameters
2
Q
Write the Syntax used to create an Inline Function
A
CREATE FUNCTION schema.fn_functionname (@parameter int)
RETURN TABLE
AS
RETURN( SELECT…FROM)
3
Q
What is the purpose of the RETURN statement in an Inline Function?
A
the RETURN statement quite literally returns the embedded (in brackets) select statement.
4
Q
What is the purpose of the RETURN TABLE statement in the creation of an Inline Function?
A
This tells SQL that it is a table valued function as compared to a scalar valued function
5
Q
What are the two main types of Inline Functions?
A
Table-valued returns a table and Scalar-valued returns just one value.