Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Silly Questions - Commit

Status
Not open for further replies.

Autosys

Programmer
Jun 1, 2004
90
0
0
GB
A very silly questions, not an expert!

In Oracle, or I suppose any SQL for that matter, are there certain statements that commit themselves or do I always have to commit a statement?

I was told that statements like inserts and updates commit themselves where on the other hand a delete statement for example always requires a commit?

I'm using standard SQL Plus and not Toad. My assumption would be that when writing SQL that contain update,insert or delete statements, to wrap them up in a transaction in order for them to be able to be rolled back. Am I assuming correct?

Cheers!
 
No. Inserts, updates and deletes all require an explicit COMMIT. These are DML statements.

DDL statements (Data-Dictionary Language) can cause an implicit commit. For example CREATE TABLE.
 
Ahh thanks a lot. Took me a while to figure out what you meant my an implicit commit but think I understand. (from looking it up)

So if I do an insert/update/delete and do say an alter table after that then it's going to automatically commit my SQL. Will that only be if the DDL statement is on the same table or any table?

Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top