CREATE PROCEDURE sptemp 
AS

 begin transaction
   
       insert into   temp1(ddd) values(99)

       insert into   temp1(ddd) values(100)

      --下面这句话报错
      insert into   temp1(ccc) values(101)


 IF @@ERROR <> 0
    ROLLBACK transaction
  ELSE
    COMMIT transaction


GO

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
猜你喜欢
  • 2021-10-31
  • 2022-12-23
  • 2022-01-07
  • 2022-02-13
  • 2022-02-27
  • 2022-12-23
相关资源
相似解决方案