usar reversão IF <some condition> BEGIN RAISERROR ('condition doesn't satisfy something', 16, 1) ROLLBACK TRANSACTION END