In SQL, the process of a transaction typically follows the ACID principles (Atomicity, Consistency, Isolation, Durability) and involves the following steps:
BEGIN TRANSACTION;  -- Begin the transaction
-- Execute SQL statements
UPDATE customers SET balance = balance - 100 WHERE id = 1;
INSERT INTO orders (customer_id, product_id, quantity) VALUES (1, 5, 3);
-- Check for errors
IF @@ERROR <> 0
ROLLBACK;  -- Rollback the transaction if an error occurred
ELSE
COMMIT;    -- Commit the transaction if no errors occurred