### Error Handling in the SQL Code

I would suggest developer for coding in couple scenario in order to capture actual error while script deployment especially when we execute a query that modifies portion of data and fails. This requires redoing their works to clean it up when this happens. Also, it potentially breaks data integrity that damages the databases. In order to avoid that I always suggest developers to wrap up their SQL code using template like—

BEGIN

BEGIN TRY

BEGIN TRAN

—Add SQL Logic here

You must log in to read the rest of this article. Please log in or register as a user.

  

Leave a Reply

Your email address will not be published.