3

In SQL Server 2012,

Does a merge statement like this :

WHEN MATCHED THEN
update SET A.len = B.len

updates a row even if A.len equals to B.len ?

Or does the SQL SERVER knows to ignore this situations ?

If not, would it be better to add the matching condition the following :

WHEN MATCHED AND A.len <> B.len THEN
update SET A.len = B.len

Is there any difference in this on other Sql servers ?

Thanks,

-1

The short answer is yes. You can read more about the Merge command syntax at the Microsoft MSDN site.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.