What will be the output of below script?
BEGIN TRYSELECT 1/0
SELECT 'Try Catch Test'
END TRY
BEGIN CATCH
SELECT ERROR_NUMBER() AS ErrorNumber
,ERROR_SEVERITY() AS ErrorSeverity
,ERROR_STATE() AS ErrorState
,ERROR_LINE() AS ErrorLine
,ERROR_MESSAGE() AS ErrorMessage;
END CATCH
After exception it will go to catch block.
And Output:
No comments:
Post a Comment