begin trybegin transaction trselect * from Car_Brandupdate car_log set [reason]='ceshiceshiceshi' where [modelid]=557;select 1/0print 'i have executed!'select * from AREAprint 'executed success';commit transaction tr <-----------------------------------------------end trybegin catchprint 'executed failed';rollback transaction trend catch
請問這段代碼里的commit 不是已經提交了么? CATCH 里的 ROLLBACK 還有用么?
蕭十郎
2022-04-21 15:11:26