补充:该问题是在sql server 2000中的数据库环境中!

解决方案 »

  1.   

    create procedure dd @id int 
    begin transaction 
      update table #temp set id=@id where column1=2
       if @error <> 0 goto roll
       update table #temp2 set id=@id where column1=2  
      if @error<>0 goto roll
        commit transcation 
      return 0 
     roll: 
      print('fail')
    rollback transcation
    return 1