I'd like to add 2 if statements to the this delete transaction and check the @rowcount value before the COMMIT, is this the correct way to do it:
DECLARE @APP_ID uniqueidentifier SET @APP_ID = '1234' BEGIN TRY BEGIN TRANSACTION; --There could be more than 1 record deleted from this Table DELETE FROM dbo.SERVERS_APPS WHERE SA_APP_ID = @APP_ID IF @@ROWCOUNT >= 1 --There should only be than 1 record deleted from this Table DELETE FROM dbo.ENVIRONMENTS_APPS WHERE ENVA_APP_ID = @APP_ID IF @@ROWCOUNT = 1 COMMIT TRANSACTION; END TRY BEGIN CATCH ROLLBACK TRANSACTION END CATCH