954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

query in sql

hi,

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

rambo123
Newbie Poster
2 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

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

alit2002
Junior Poster in Training
52 posts since Dec 2006
Reputation Points: 10
Solved Threads: 3
 

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

mir77
Newbie Poster
9 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

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.

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You