How to Avoid Accidentally Update of Record in Sql

I am writing this  post after i accidentally update all the records in a table. To avoid accidental  update just follow this simple method . Before executing the query just put a "Begin Transaction" above your query and "Rollback Transaction" after your Query.