SQL SERVER – MERGE or INSERT, UPDATE, DELETE – Quiz – Puzzle – 19 of 31

Click here to get free chapters (PDF) in the mailbox

Year 2011 was a year of learning and opportunity for me. My recent book, SQL Server Interview Questions and Answers, has received such overwhelming love and support from all of you. While writing the book, I had two simple goals: (1) Master the Basics and (2) Ignite Learning. There was a constant request from the Community to take the learning of these books to the next level. Here is an article which discusses the Author’s Perspective.

Beyond Relational has come up with a very interesting concept – they have converted a few of the questions from my book into the SQL Quiz. The quiz is indeed focused on my two goals. In addition, it’s going to put the learning of the book to a higher stage. Looking at this novel concept, Vinod Kumar (Co-author) and I have decided to help every participant and reader by giving a few hints and suggestions to solve the quiz.

SQL Quiz

SQL SERVER - MERGE or INSERT, UPDATE, DELETE  - Quiz - Puzzle - 19 of 31 19

In any performance-testing discussion for a huge, significant development, one of the common requirements is to send multiple values to SQL Server in a single shot. So to help achieve this this requirement, SQL Server introduced the MERGE statement. What is the construct of a MERGE statement? What are the restrictions of using the MERGE?

Link to participate in SQL Quiz

Notes of Vinod Kumar

A MERGE statement has great benefits as ETL requirements. Read for more details. As you use them in relational engine, can you tell how you can get details of how many INSERTS, UPDATES and DELETES have happened as part of the database?

Notes of Pinal Dave

What is UPSERT? It is commonly used word for INSERT and UPDATE. How about adding DELETE to the UPSERT as well – what will you call? I will call it MERGE. When I came across MERGE I was very happy as it was not only INSERT, UPDATE and DELETE but if used correctly there were many advantages associated with this operation. Initially, it was very hard into use MERGE statement as I was so used to writing INSERT, UPDATE and DELETE. As I kept myself open to this new procedure; I learned that this can be very helpful. To master any feature, solution or tool, one needs to learn about the limitations of MERGE . Today’s question is based on the main questions above: “What is MERGE and what are the restrictions of the MERGE statement?”

Additional Notes

SQL Server Interview Questions and Answers ISBN: 1466405643 Page#112
Merge Operations – Insert, Update, Delete in Single Execution
Introduction to Merge Statement – One Statement for INSERT, UPDATE, DELETE
Explanation SQL SERVER Merge Join

Prize

There are exciting prizes awaiting the winners. Click here for Prizes and Frequently Asked Questions.

Link to participate in SQL Quiz

Note: SQL Quiz, winners and prizes are administrated by Beyond Relational. The goal of this blog post is to provide additional learning pointers only.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Previous Post
SQL SERVER – Importance of Resource Database – Quiz – Puzzle – 18 of 31
Next Post
SQL SERVER – Methods for Accessing SQL Server XML Datatype – Quiz – Puzzle – 20 of 31

Related Posts

No results found.

4 Comments. Leave new

  • avinash reddy
    May 12, 2013 9:35 pm

    hi pinel garu how ru?
    u blog is really awesome i felt wondered about ur blog i have an lot of interest to learn all aspects of sql server could you please give me a mail id i have a lot of doubts in sql please help me out pinel

    thanking you,

    Avinash Reddy

    Reply

Leave a Reply