exam questions

Exam 70-762 All Questions

View all questions & answers for the 70-762 exam

Exam 70-762 topic 1 question 42 discussion

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

Note: this question is part of a series of questions that use the same or similar answer choices. An answer choice may be correct for more than one question in the series. Each question is independent of the other questions in the series. Information and details provided in a question apply only to that question.
You are developing an application to track customer sales.
You need to create a database object that meets the following requirements:
- Return a value of 0 if data inserted successfully into the Customers table.
- Return a value of 1 if data is not inserted successfully into the Customers table.
- Support TRY"¦CATCH error handling
- Be written by using Transact-SQL statements.
What should you create?

  • A. extended procedure
  • B. CLR procedure
  • C. user-defined procedure
  • D. DML trigger
  • E. scalar-valued function
  • F. table-valued function
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️
DML triggers is a special type of stored procedure that automatically takes effect when a data manipulation language (DML) event takes place that affects the table or view defined in the trigger. DML events include INSERT, UPDATE, or DELETE statements. DML triggers can be usedto enforce business rules and data integrity, query other tables, and include complex Transact-SQL statements.
References:
https://msdn.microsoft.com/en-us/library/ms178110.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
Dieter
Highly Voted 5 years, 9 months ago
in my opinion, the answer is C "user defined procedure" since Triggers cannot return the required values, a proc can.
upvoted 47 times
...
moehijawe
Highly Voted 5 years, 4 months ago
C. user-defined procedure
upvoted 15 times
...
caeesz
Most Recent 4 years, 5 months ago
trigger cannot return is correct answer is C
upvoted 1 times
...
Solis
4 years, 10 months ago
Do DML triggers return a value? Could procedures be created so that automatically executed during DML?
upvoted 1 times
Hoglet
4 years, 6 months ago
It's not a Trigger, the answer should be Stored Procedure
upvoted 2 times
...
...
AndroJS
4 years, 12 months ago
UPDATE function within a trigger accepts a single parameter which is a column name for the underlying table. It will return a Boolean value depending on whether the column was updated or not. It can only check one column at a time, but can be called many times.
upvoted 1 times
...
Anette
5 years ago
I think its C.
upvoted 5 times
...
JohnFan
5 years, 3 months ago
Extended procedures are routines residing in DLLs that function similarly to regular stored procedures. They receive parameters and return results via SQL Server's Open Data Services API and are usually written in C or C++. They must reside in the master database and run within the SQL Server process space
upvoted 2 times
Anette
5 years ago
What is an extended procedure? There is nothing in Study Guide of this exams :/
upvoted 1 times
...
NickMane
4 years, 9 months ago
irrelevant
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 ...