Skip to content

Microsoft 70-761

Querying Data with Transact-SQL

Verified practice questions with detailed answers, clear explanations, and community discussion.

  • 201

    questions

  • 10 days ago

    last updated

  • 4.8/5

    overall rating

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 choices
Show answer

Correct answer: 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 choices
Show answer

Correct answer: 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 choices
Show answer

Correct answer: 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 choices
Show answer

Correct answer: 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?

Answer choices
Show answer

Correct answer: B

The given solution will not ensure that both records are inserted or neither record is inserted. The solution consists of two separate INSERT INTO statements. If one of the statements fails, the other could still succeed, resulting in only one of the records being inserted. To ensure that both records are inserted or neither record is inserted, the statements must be executed within a single transaction using BEGIN TRANSACTION and COMMIT TRANSACTION. Additionally, you would need to set XACT_ABORT to ON to automatically roll back the transaction if any statement within the transaction fails. Therefore, the solution does not meet the goal.

196 questions still locked

Your preview covered the first 5 questions. Unlock the rest to see every explanation and discussion thread, updated weekly

View plans

Choose your plan

Single payment · No subscription · No hidden fees

Standard

For a focused sprint before your exam date

$25USD

30 days of access, single payment

  • All 201 questions unlocked
  • Detailed answer explanations
  • Community discussions and votes
  • Weekly question updates
  • Printable PDF download
  • 100% refund if you do not pass

Premium

Extra runway, the PDF, and the refund guarantee

$35$60USD

90 days of access, single payment

Printable PDF download

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

  • All 201 questions unlocked
  • Detailed answer explanations
  • Community discussions and votes
  • Weekly question updates

Full refund if you do not pass

Send us your exam result and we refund the purchase.

Stories from the certified

Charles Sirois
Canada
As this was my first certification exam, I was understandably nervous about what to expect. These study materials made the preparation process much easier, and many of the questions closely reflected those on the actual exam.
Lance Chambers
United States
Wasted about a month going through the free dump sites scattered all over reddit, half the answers were wrong and the other half were for a version of the exam that doesn't even exist anymore. Eventually gave in and paid the small fee here, and the difference was night and day.
Alisha Kelly
Italy
Honestly, I had already gone through the official documentation quite thoroughly, but still didn't feel fully confident going in. This helped things finally click for me. I realized I knew the material, but just hadn't connected all the pieces yet.
Casper Claassen
Netherlands
Used this along with Microsoft Learn and the combo worked really well. The practice questions made the stuff I'd read actually stick. Passed first attempt, no complaints from me.
Gabriele Ghesla
Italy
The content is accurate and clearly presented, and it's more affordable than competitors. The team has been incredibly responsive whenever I've had an issue, and they've been open to small changes that improve the platform.
Charles Sirois
Canada
As this was my first certification exam, I was understandably nervous about what to expect. These study materials made the preparation process much easier, and many of the questions closely reflected those on the actual exam.
Lance Chambers
United States
Wasted about a month going through the free dump sites scattered all over reddit, half the answers were wrong and the other half were for a version of the exam that doesn't even exist anymore. Eventually gave in and paid the small fee here, and the difference was night and day.
Alisha Kelly
Italy
Honestly, I had already gone through the official documentation quite thoroughly, but still didn't feel fully confident going in. This helped things finally click for me. I realized I knew the material, but just hadn't connected all the pieces yet.
Casper Claassen
Netherlands
Used this along with Microsoft Learn and the combo worked really well. The practice questions made the stuff I'd read actually stick. Passed first attempt, no complaints from me.
Gabriele Ghesla
Italy
The content is accurate and clearly presented, and it's more affordable than competitors. The team has been incredibly responsive whenever I've had an issue, and they've been open to small changes that improve the platform.
Morgan Farmer
United Kingdom
I don't usually leave reviews, but this one felt worth sharing. The questions were quite close to what actually appeared on the exam, more than I expected. I spent about a week going through the material before my test, and it helped me feel more prepared.
Remi Nuyts
United States
Passed ITIL 4 Foundation with 87%. Material was enough by itself.
Archie Hopkins
United States
I had a smooth experience from start to finish. Access was available right away, no technical issues, which made it easy to get started. The content felt relevant and aligned well with what I was looking for.
Nancy Mcbride
United States
Does what it says it does. Content felt solid, nothing confusing to navigate and I didn't run into any weird issues. I been putting off scheduling the exam for a while and going through this gave me enough confidence to finally book it and pass.
Neil Savage
United States
A very quick response was received via email when a link issue occurred. The study materials provided were high quality and extremely helpful. I was able to complete the test successfully. Many thanks for the excellent support.
Morgan Farmer
United Kingdom
I don't usually leave reviews, but this one felt worth sharing. The questions were quite close to what actually appeared on the exam, more than I expected. I spent about a week going through the material before my test, and it helped me feel more prepared.
Remi Nuyts
United States
Passed ITIL 4 Foundation with 87%. Material was enough by itself.
Archie Hopkins
United States
I had a smooth experience from start to finish. Access was available right away, no technical issues, which made it easy to get started. The content felt relevant and aligned well with what I was looking for.
Nancy Mcbride
United States
Does what it says it does. Content felt solid, nothing confusing to navigate and I didn't run into any weird issues. I been putting off scheduling the exam for a while and going through this gave me enough confidence to finally book it and pass.
Neil Savage
United States
A very quick response was received via email when a link issue occurred. The study materials provided were high quality and extremely helpful. I was able to complete the test successfully. Many thanks for the excellent support.

Before you buy

Answers about access, updates, payments, and the refund policy.

01Are these real exam questions?

Our Microsoft 70-761 questions are based on real exam experiences and are regularly updated to match the current exam format. Most candidates who study with us report passing on their first attempt, based on a self reported post exam survey.

02What happens if I don't pass the 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.

03How often are the questions updated?

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.

04What does Premium add on the exam page?

Both plans open the full question bank, the explanations, and the discussions. Premium also includes the printable PDF and advanced study tools, giving you full control over how many questions you see per page, quick navigation to any page, and the ability to resume exactly where you left off.

05Is this a single payment or a subscription?

This is a single 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.

06How many questions are included?

You get access to all 201 questions in our database for the Microsoft 70-761 exam. This includes detailed explanations and answer justifications to help you understand the concepts thoroughly.

07Do you offer technical support?

Yes. Email us at hello@examice.com for help with access, billing, or the platform. We read every message and typically reply within 24 hours on business days.

08Is my payment secure?

Absolutely! We use industry standard SSL encryption and process all payments through Stripe, a trusted payment processor used by millions of businesses worldwide. Your payment and personal information are completely secure.

Ready to unlock the rest

All 201 questions from $25, single payment, instant access.

Back to plans