2021
10-12
10-12
SQL SERVER提交事务回滚机制
1、回滚语句1:SETXACT_ABORTOFFBEGINTRANINSERTINTOscoreVALUES(101,90)INSERTINTOscoreVALUES(102,78)INSERTINTOscoreVALUES(107,76)/**//*ForeignKeyError*/INSERTINTOscoreVALUES(103,81)INSERTINTOscoreVALUES(104,65)COMMITTRANgo 结果1:只回滚错误行,语句还继续执行。?select*fromscore101901027810381104652、回滚语句2:SETXACT_ABORTonBEGINTRANINSERTINTOscoreV...
继续阅读 >