exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 22 discussion

Actual exam question from Microsoft's 70-761
Question #: 22
Topic #: 1
[All 70-761 Questions]

HOTSPOT -
You have the following Transact-SQL query:

What type of functions are used in the query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: Scalar -
The return value of a function can either be a scalar (single) value or a table.

Box 2: Table-Valued -
The APPLY operator allows you to invoke a table-valued function for each row returned by an outer table expression of a query. The table-valued function acts as the right input and the outer table expression acts as the left input. The right input is evaluated for each row from the left input and the rows produced are combined for the final output. The list of columns produced by the APPLY operator is the set of columns in the left input followed by the list of columns returned by the right input.
References:
https://msdn.microsoft.com/en-us/library/ms186755.aspx
https://technet.microsoft.com/en-us/library/ms175156(v=sql.105).aspx

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Vanesa30
Highly Voted 5 years, 3 months ago
The first one is UDF Scalar because only returns a value , whereas the second one is a Table-based function which returns a table
upvoted 7 times
...
Angelcr
Most Recent 4 years, 5 months ago
The answer is correct, CROSS APPLY is used to make a Table coexist with a TABLE FUNCTION, in the SELECT you can only use a SCALAR FUNCTION. https://www.sqlshack.com/es/la-diferencia-entre-cross-apply-y-outer-apply-en-sql-server/
upvoted 1 times
...
Vanesa30
5 years, 3 months ago
I meant the second onse is table-valued instead of table-based
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago