Database: Azure SQL
Programming language: C#.NET
System.Data.Com mon. DbCommand command. ExecuteNonQuery () returns negative, on the merge into statement is not clear why some people encountered similar problems?
Program runs the rectified has never been the problem, only recently suddenly appeared,
Local couldn't reproduce, and the same period of SQL sometimes return is not negative, sometimes returned to negative, so has been can't find the reason,
Perform a merge into sentence structure is as follows:
The MERGE
INTO TABLE_A AS A
USING (
The SELECT...
B) the AS
ON (
.
) the WHEN MATCHED THEN UPDATE
SET
.
WHEN NOT MATCHED THEN
INSERT (
.
)
VALUES (
.
);