从来没见过这么漂亮的女律师,做你的当事人一定会很幸福。学会坚强,做一只沙漠中永不哭泣的骆驼!
BEGIN TRY
...
...
END TRY
BEGIN CATCH
DECLARE @ErrorMessage NVARCHAR(4000);
DECLARE @ErrorSeverity INT;
DECLARE @ErrorState INT; SELECT
@ErrorMessage = ERROR_MESSAGE(),
@ErrorSeverity = ERROR_SEVERITY(),
@ErrorState = ERROR_STATE(); RAISERROR (@ErrorMessage, -- Message text.
@ErrorSeverity, -- Severity.
@ErrorState -- State.
);
END CATCH;
以上就是在SQLServer的try...catch语句中获取错误消息代码的的语句。你一天的爱心可能带来别人一生的感谢。更多关于在SQLServer的try...catch语句中获取错误消息代码的的语句请关注haodaima.com其它相关文章!