Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

If an INSERT fails, does the sql that follows still run? (is my code unreachable?)

$
0
0
We have a stored procedure as below, which inserts a record, then checks @@ROWCOUNT to see if it was successful and throw an error if it returned 0.

Is the THROW statement unreachable? I cannot think of any situation where it would run.


Viewing all articles
Browse latest Browse all 3145

Trending Articles