exam questions

Exam 70-761 All Questions

View all questions & answers for the 70-761 exam

Exam 70-761 topic 1 question 18 discussion

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

You need to create an indexed view that requires logic statements to manipulate the data that the view displays.
Which two database objects should you use? Each correct answer presents a complete solution.

  • A. a user-defined table-valued function
  • B. a CRL function
  • C. a stored procedure
  • D. a user-defined scalar function
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️
You can create a database object inside an instance of SQL Server that is programmed in an assembly created in the Microsoft .NET Framework common language runtime (CLR). Database objects that can leverage the rich programming model provided by the common language runtime include aggregate functions, functions, stored procedures, triggers, and types.

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
Tazul
Highly Voted 5 years, 8 months ago
B,D https://www.briefmenow.org/microsoft/which-two-database-objects-should-you-use/
upvoted 8 times
...
Vermonster
Most Recent 4 years, 4 months ago
Definitely A & D - both can be schema bound. You can't call a stored procedure from a view since it needs to be comprised of single SELECT statement.
upvoted 1 times
...
kimalto452
4 years, 4 months ago
correct answers AD: A: table valued function can be called from index view TESTED. B: CRL doesnt exist, exist CLR C: Store procedure cant be called from view D: scalar function CAN be called from view
upvoted 2 times
...
julie2020
4 years, 9 months ago
Correct Answer: B,D
upvoted 2 times
kimalto452
4 years, 4 months ago
CRL function doesnt exist haha
upvoted 1 times
...
...
AlaskanBumblebee
4 years, 9 months ago
A clustered index can't reference a TVF or MSTVF in the SELECT statement, but it can still be elsewhere such as in the WHERE clause. CLR functions aren't database objects, and stored procedures can't be invoked from a view, so I'd pick A,D. https://docs.microsoft.com/en-us/sql/relational-databases/views/create-indexed-views?view=sql-server-ver15
upvoted 2 times
...
Takecare
4 years, 10 months ago
Answer: BD A: A table-valued function cannot be called from the indexed view C: The Stored procedure cannot be called inside of a View.
upvoted 4 times
kimalto452
4 years, 4 months ago
are you tested? You can call from indexed view a table valued function... TESTED
upvoted 1 times
...
...
Anette
4 years, 11 months ago
I think it A and D (both of them have user-defined functions) You can even use a user-defined function to query an indexed view, and with parameter support, improve its functionality.
upvoted 3 times
...
jortizhuedo
5 years, 1 month ago
CRL function no existe. Es CLR FUNCTION
upvoted 2 times
...
Robintang0924
5 years, 4 months ago
A,C a user-defined table-valued function can return what we wanted expression values as long as we specify schemabinding option. stored procedure with table value variable as output parameter could also achieve the same purpose. B,D doesn't meet requirement since CLR function is not a DB object and scalar function didn't meet requirement of returning multiple rows.
upvoted 2 times
...
mattia_88
5 years, 6 months ago
If you create a function with option "SCHEMABINDING" you can use user-defined function table and scalar
upvoted 2 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