In T-SQL:
BEGIN TRANSACTION
{query to update/delete records}
(If the query returned the expected amount of affected rows)
COMMIT TRANSACTION
(If the query did not return the expected amount of affected rows)
ROLLBACK TRANSACTION
Note: I’ve been told before that this will lock the affected table(s) until the changes made are committed or rolled back, but after looking it up it looks like it depends on a lot of minor details. Just be careful if you use it in production.
This is pretty upsetting to see. In Phoenix Arizona Cox Communications is the biggest ISP and their prices reflect it. Their internet was fast and reliable while I used it, but paid ~$180 a month for gigabit speed. I got a flyer in the mail for Verizon’s 5G home internet with a promotion for a ‘price lock’ for 10 years at $25 a month bundled with our cell phone plan. The speeds are definitely slower (100-300mbps in my area), but I don’t notice it at all even when gaming - AND have had fewer outages in the year we’ve had it than when we had cox. It’s clear with the new companies coming into install fiber in Mesa and Phoenix that cox will begin to feel the squeeze, and I would not be surprised if this tactic becomes more prevalent.