存储过程

CREATE PROCEDURE [dbo].[proc_test]
@success bit out,
@id int

as
begin
Set NOCOUNT ON;  
Set XACT_ABORT ON; 

    begin try
        begin tran transtest
            --begin
            ----。。。。
            --end
            set @success = 1
        commit tran transtest
    end try
    begin catch
        if @@trancount > 0
            rollback tran transtest
    set @success = 0
    end catch
    
end

 

posted @ 2018-07-05 19:09  一夜秋2014  Views(169)  Comments(0Edit  收藏  举报