存储过程调试

    BEGIN TRY 
    BEGIN TRAN;
    
    /***需调试的存储过程开始**/
    declare @Stat tinyint;
    set @Stat=1;
    select @Stat=10000;
    /***需调试的存储过程结束**/
   
    ROLLBACK TRAN;
    END TRY 
    BEGIN CATCH 
    ROLLBACK TRAN;
    --输出错误信息
    SELECT ERROR_NUMBER() AS ErrorNumber,ERROR_MESSAGE() AS ErrorMessage;

    END CATCH


转载于:https://www.cnblogs.com/dashi/p/4034649.html

你可能感兴趣的:(存储过程调试)