hi,

what is the diffrence between delete and truncate command in sql.
plz send me tutorials of oracle also.
waiting for your reply.


<URL SNIPPED>

Recommended Answers

All 3 Replies

Delete allows you to rollback or undo your transaction. Truncate doesn't use the rollbacks and the data is gone. Truncate should be quicker than delete if you are deleting all records in a table.

Check otn.oracle.com for documentation.

Alistair

hi,

what is the diffrence between delete and truncate command in sql.
plz send me tutorials of oracle also.
waiting for your reply.

computer support

Morely delete command delete the data but not memory capture by row but truncate delete the rows and release the space captured by rows.

mir77

delete deletes the records, which can be made permanent by using COMMIT, and can't be rolled back.

Truncate deletes the rows and resets the high watermark and there by de-allocating all the space allocated to the table.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.