Query Quest PostgreSQL Course

Use transactions

A transaction groups changes. COMMIT saves them together; ROLLBACK cancels them. If something fails, PostgreSQL can avoid leaving half-finished work.

What you'll learn

BEGIN starts a transaction. COMMIT completes it. Multiple statements can run in one console submission.

Your mission

In a transaction, give nova 100 xp and commit. Their new total should be 1300.

Enable JavaScript to run SQL in the interactive lesson.