[1] Inline Functions Flashcards

1
Q

In what major way do Inline Functions differ from Views?

A

An Inline Function can take parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two main types of Inline Functions?

A

Table-valued returns a table and Scalar-valued returns just one value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly