You use SQL Server 2014 to maintain the data used by applications at your company. You want to execute two statements. You need to guarantee that either both statements succeed, or both statements fail together as a batch. Which code should you use?
Answer is D, because it is new way of handling errros.
Option D.
Begin try
Begin transaction
Insert table1 (field1) values ('one')
Insert table2 (field1) values ('two')
commit transaction
end try
begin catch
rollback transaction
end catch
This section is not available anymore. Please use the main Exam Page.70-764 Exam Questions
Log in to ExamTopics
Sign in:
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.
dxico
4 years, 5 months agovescafi
4 years, 6 months agoTheSwedishGuy
5 years, 4 months agoIva10
5 years agoSpicy2312
5 years, 10 months ago