As a beginner to SQL, please run all your queries as SELECT before you do any UPDATE. Make sure everything looks the way it's meant to with the SELECT before you UPDATE.
You cannot undo an UPDATE (unless you have DB backups which you can restore).
Or learn how to do TRANSACTIONS, where you can ROLLBACK before you COMMIT.