BEGIN TRY -- start error handling
BEGIN TRANSACTION; -- from here on transactions (modifictions) are not final
-- start your statement(s)
select 42/0 as ANSWER -- simple SQL Query with an error
-- end your statement(s)
COMMIT TRANSACTION; -- finalize all transa...