0d: 00h: 00m: 00s

🎁 Get 3 extra months of learning — completely FREE

That's 90 extra days to master new skills, build more projects, and land your dream job.

Become a PRO
Background Image

🎁 Get 3 extra months of learning completely FREE

Become a PRO
Julia
PRO
last month
Juliacountry asked

Are changes not saved if you don’t use a TCL clause?

Abhay Jajodia
Expert
2 days ago
Abhay Jajodia answered

Hi Julia,

Yes, that’s correct — if you don’t use a TCL command like COMMIT, your changes may not be saved permanently.

When you run SQL statements like INSERT, UPDATE, or DELETE, the changes happen in a temporary state called a transaction. They're not actually saved to the database until you explicitly commit them:

COMMIT;

If you don’t run COMMIT, and you close the connection or something goes wrong, those changes can be rolled back — meaning they’re lost.

You can also use:

  • ROLLBACK to undo changes

  • SAVEPOINT to mark specific points you might roll back to

So yes — using TCL commands like COMMIT is what finalizes your changes.

If you have more questions, I am here to help.

SQL
This question was asked as part of the Learn SQL Basics course.