Querying Data with Transact-SQL

Here you have the best Microsoft 70-761 practice exam questions

  • Preview the first 5 of 201 questions for free
  • These questions were last updated on April 28, 2026
  • This site is not affiliated with or endorsed by Microsoft.
Question 1 of 201

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You create a table named Products by running the following Transact-SQL statement:
Exam 70-761: Question 1 - Image 1
You have the following stored procedure:
Exam 70-761: Question 1 - Image 2
You need to modify the stored procedure to meet the following new requirements:
✑ Insert product records as a single unit of work.
✑ Return error number 51000 when a product fails to insert into the database.
✑ If a product record insert operation fails, the product information must not be permanently written to the database.
Solution: You run the following Transact-SQL statement:
Exam 70-761: Question 1 - Image 3
Does the solution meet the goal?
Answer

Suggested Answer

The suggested answer is B.

The solution does not meet the goal. There are two primary issues with the provided SQL script. First, the column names in the INSERT statement do not match those in the Products table definition; 'ProductPrice' should be 'UnitPrice', and 'ProductsInStock' should be 'UnitsInStock'. Second, there is a missing semicolon terminator after the ROLLBACK TRANSACTION statement in the CATCH block. Correcting these issues is necessary for the script to function as intended. When SET XACT_ABORT is ON, if a runtime error occurs, the entire transaction is terminated and rolled back, which is correct behavior but is overshadowed by the syntax errors.

Question 2 of 201

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You create a table named Products by running the following Transact-SQL statement:

Exam 70-761: Question 2 - Image 1

You have the following stored procedure:

Exam 70-761: Question 2 - Image 2

You need to modify the stored procedure to meet the following new requirements:

  • Insert product records as a single unit of work.
  • Return error number 51000 when a product fails to insert into the database.
  • If a product record insert operation fails, the product information must not be permanently written to the database.

Solution: You run the following Transact-SQL statement:

Exam 70-761: Question 2 - Image 3

Does the solution meet the goal?

Answer

Suggested Answer

The suggested answer is B.

The solution does not meet the goal. The transaction correctly captures the INSERT INTO Products statement and rolls back if an error occurs, ensuring that the product information is not permanently written to the database if there is a failure. However, the error number 51000 is not explicitly returned because the code checks for @ERROR = 51000 after rolling back the transaction but does not create or trigger an error number 51000. The error handling mechanism needs to be improved to explicitly set and return error number 51000 when a failure occurs.

Question 3 of 201

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You create a table named Products by running the following Transact-SQL statement:

Exam 70-761: Question 3 - Image 1

You have the following stored procedure:

Exam 70-761: Question 3 - Image 2

You need to modify the stored procedure to meet the following new requirements:

  • Insert product records as a single unit of work.
  • Return error number 51000 when a product fails to insert into the database.
  • If a product record insert operation fails, the product information must not be permanently written to the database.
Exam 70-761: Question 3 - Image 3

Solution: You run the following Transact-SQL statement:

Exam 70-761: Question 3 - Image 4

Does the solution meet the goal?

Answer

Suggested Answer

The suggested answer is B.

The solution provided does not explicitly handle transactions to ensure the operations are completed as a single unit of work. While TRY...CATCH blocks handle error reporting, they do not inherently provide transactional control. To ensure the product information is not permanently written to the database if an insert fails, you need to use explicit transaction handling with BEGIN TRANSACTION and ROLLBACK TRANSACTION in case of failure, along with COMMIT TRANSACTION upon successful completion. The absence of these transactional commands means the solution does not fully meet the described requirements.

Question 4 of 201

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You create a table named Customer by running the following Transact-SQL statement:

Exam 70-761: Question 4 - Image 1

You must insert the following data into the Customer table:

Exam 70-761: Question 4 - Image 2

You need to ensure that both records are inserted or neither record is inserted.

Solution: You run the following Transact-SQL statement:

Exam 70-761: Question 4 - Image 3

Does the solution meet the goal?

Answer

Suggested Answer

The suggested answer is B.

The solution does not meet the goal because there are two separate INSERT statements. To ensure that both records are inserted or neither record is inserted, a transaction should be used. This can be achieved with BEGIN TRANSACTION, COMMIT, and ROLLBACK statements to group the inserts into a single transactional unit. Without a transaction, if an error occurs in the second INSERT statement, the first one could still be committed, which does not fulfill the requirement of 'both or neither'.

Question 5 of 201

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section. You will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You create a table named Customer by running the following Transact-SQL statement:

Exam 70-761: Question 5 - Image 1

You must insert the following data into the Customer table:

Exam 70-761: Question 5 - Image 2

You need to ensure that both records are inserted or neither record is inserted.

Solution: You run the following Transact-SQL statement:

Exam 70-761: Question 5 - Image 3

Does the solution meet the goal?

196 more questions await

Unlock the full Microsoft 70-761 question bank

5 of 201 completed2%

Choose your plan

One-time payment · No subscription · No hidden fees

Standard

Quick preparation

$25

30 days access

30 day access to all questions
Instant free updates
Highest passing rate in industry
Printable PDF download
No money-back guarantee
Best Value

Premium

Guaranteed success

$60$35

90 days access

PDF

Printable PDF download

New

Save every question as a PDF for offline study or printing.

90 day access to all questions
Instant free updates
Highest passing rate in industry
Pass guaranteed or money back

100% Money-Back Guarantee

Don't pass? Full refund.

4.9/5

Based on 4,420+ reviews

Trusted by thousands of professionals

Join certified professionals who passed their exams with Examice

Examice helped me pass my AWS certification on the first try! The questions were incredibly similar to the real exam. Comments helped me understand answers I was struggling with.
S
Sarah C.
Cloud Engineer
Great results in a short prep time. Passed on my first attempt.
D
David K.
Network Engineer
I needed to pass an exam for work, and this website delivered. The quality for the price is outstanding, and the support is really good. I passed without issues.
M
Michael R.
Security Analyst
Skeptical at first, but impressed. Every question included clear, detailed explanations.
L
Lisa M.
Solutions Architect
The guarantee gave me confidence to invest in the premium package. Turns out I didn't need it. Passed comfortably. The explanations for each answer were incredibly detailed and helped me grasp security concepts that I'd been struggling with for months.
R
Robert H.
Cybersecurity Consultant
Used Examice for my PMP certification. The questions were well structured and covered all exam domains thoroughly.
J
James T.
IT Manager
After failing my first attempt with other study materials, I switched to Examice and passed confidently on my second attempt.
A
Anna W.
Data Engineer
The premium package was worth it. 90 days of access gave me the flexibility to study when it worked for me, without feeling rushed.
E
Emily J.
DevOps Engineer
Straightforward questions that matched the real exam perfectly. Studied for two weeks and passed with a great score.
K
Karen P.
Systems Administrator

Frequently Asked Questions

Everything you need to know. Contact us for more.

Our Microsoft 70-761 questions are based on real exam experiences and are continuously updated to match the current exam format. We maintain a +99% pass rate because our questions closely mirror what you'll see on the actual exam.

With our Premium package, you get a 100% money-back guarantee. If you don't pass your exam after studying with our materials, simply contact us with your exam results and we'll refund your purchase. Terms and conditions apply, read our full refund policy to learn more.

Our question bank is updated regularly based on feedback from recent exam takers. We typically review and update our content every week with reports about new questions or changes to the exam format.

Standard package access cannot be extended. However, Premium package gives you 90 days which is typically more than enough time to prepare thoroughly. If you need additional time, you can purchase a new package at any time.

This is a one-time payment with no recurring charges. Once you purchase, you get full access to all exam questions for the duration of your package (30 days for Standard, 90 days for Premium). No hidden fees or automatic renewals.

Pass on your first try

All 201questions · Detailed explanations · Printable PDF · 90 days access

Money-back guaranteeSecure checkout
$35

one-time payment