What does COMMIT do?

All the DML (insert, update , delete) to be inserted in the database you have to commit them, like approve that you want to add them in the database. If you dont commit DML statment , it will not be enter in the database.

what is commit ?

Docs.oracle cant describe it better

Use the COMMIT statement to end your current transaction and make permanent all changes performed in the transaction. A transaction is a sequence of SQL statements that Oracle Database treats as a single unit. his statement also erases all savepoints in the transaction and releases transaction locks.


If you insert data without commit you can select data from database and see it. But other users can't.

It's better to look to sql documentation:

Until you commit a transaction:

You can see any changes you have made during the transaction by querying the modified tables, but other users cannot see the changes. After you commit the transaction, the changes are visible to other users' statements that execute after the commit.

You can roll back (undo) any changes made during the transaction with the ROLLBACK statement (see ROLLBACK.

for example here Oracle Documentation and some info about transactions

Tags:

Sql

Oracle