BEGIN TRY
DELETE FROM tablesamaple where strsampletodelete = 'todelete'
END TRY
BEGIN CATCH
Print ERROR_MESSAGE()
END CATCH
How to use Try catch in sql server and print the error message
This blog shows on how to use Try catch in sql server and print the error message


Join the conversation! Your thoughts help the community grow.