Consider the following data in two table

LoanDetails:

EMIPaymentdetails:

What will be the output on executing the below code?

MERGE LoanDetails AS LD
USING EMIPaymentDetails AS EMI
ON LD.Loanid = EMI.Loanid
WHEN MATCHED THEN 
UPDATE SET LoanAmount = LoanAmount-EMI.Amountpaid
WHEN NOT MATCHED THEN 
UPDATE SET LoanAmount = LoanAmount+1500;

4 rows will be updated
Error. Update is not allowed in the WHEN NOT MATCHED condition
2 rows will be updated
Error. MATCHED condition can’t update the target Table
Verified Answer
Correct Option - b

To get all Infosys Certified MS SQL Server Developer Exam questions Join Telegram Group https://rebrand.ly/lex-group-70b557

Telegram

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in

Updated on Mon, 15 Sept 2025