Another reason to use THROW clause instead of RAISERROR

In my previous post [link] I talked about the new THROW clause introduced in SQL Server 2012 and how it is different from the existing RAISERROR function. I just stumbled on one more reason to stop using RAISERROR function and start using the new THROW clause. There are some SQL statements that throws more than…

1

New THROW statement in SQL Server 2012 (vs RAISERROR)

The new THROW keyword introduced in SQL server 2012 is an improvement over the existing RAISERROR() statement. Yes, it’s single ‘E’ in RAISERROR. Both RAISERROR & THROW can be used in T-SQL code/script to raise and throw error within a TRY-CATCH block. Check my previous post for TRY-CATCH block, [link]. >> With RAISERROR developers had to…

7