if a sql server table’s column is wiped out in a database and you restore a backup to a new database, would you use merge to restore that column or run an update across the two databases?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Both would work, and maybe UPDATE is easier to write.
MERGE is aimed at more complex cases like you want to update some records, delete others, and also insert some records in the target table, absed on some condition of the source and target table.
The UPDATE would be as follows:
or