What should you create?

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?

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

Explanation:
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.
https://msdn.microsoft.com/en-us/library/ms178110.aspx



Leave a Reply 1

Your email address will not be published. Required fields are marked *