Table 2, a new record="elementary school"} {school,
Two tables it doesn't matter, no constraint, who can Merge to do two things, a word I learn, thank you.
CodePudding user response:
This is common sense demand?CodePudding user response:
Can't, the MERGE of the target table is only one,If both mandatory should agree to complete, the transaction should be used, similar to the following:
BEGIN TRY
The BEGIN TRAN
- to do
COMMIT TRAN.
END the TRY
The BEGIN CATCH
The ROLLBACK TRAN.
The SELECT ERROR_MESSAGE () AS MSG;
END the CATCH