When you need to run something potentially dangerous, use transactions.  For example, I’m updating the region custom property for a series of nodes whose nodeid is greater than 250.

BEGIN TRANSACTION

UPDATE nodes SET region = 'FOO' WHERE nodeid > 250

Once that query is run, you’ll see how many rows you’ve affected.  If you want to run other select commands, like:

SELECT region, count(1) AS qty FROM nodes GROUP BY region ORDER BY count(1) DESC

If you’re happy with what you see, you can commit:

COMMIT TRANSACTION

Alternatively, you can rollback and it’s as if the original UPDATE never took place:

ROLLBACK TRANSACTION