Results 1 to 19 of 19

Thread: difference between delete and truncate

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Mar 2007
    Answers
    1

    Re: difference between delete and truncate

    Hi,
    This is Veera Reddy
    The difference between delete and truncate is.
    if u use delete, it will delete row by row and after deletion there is a possibility of rollback your data where as if you use truncate it will delete the entire table i.e., with structure and after deletion it will recreate the structure and there is no possibility of rollback of data once you apply truncate.


  2. #2
    Expert Member
    Join Date
    Jun 2006
    Answers
    410

    Re: difference between delete and truncate

    Just wanted to add one more point.

    Truncate is a DDL command and Delete is a Dml command.

    DDL statements perform commit implicitly. That is why your changed are committed automatically when ever you perform a DDL statement ( Create,Alter etc).

    DML statements does not commit your changes. You have to commit explicitly inorder to save your changes. Examples of DML commands are insert,update, delete etc.


  3. #3
    Junior Member
    Join Date
    Jun 2007
    Answers
    28

    Re: difference between delete and truncate

    Add one more point also

    When Delete the Particular row the Corresponding Delete Trigger(if exists) Fire.
    In Case of Truncate the Trigger is not fired.


  4. #4
    Junior Member
    Join Date
    Oct 2007
    Answers
    6

    Re: difference between delete and truncate

    hi
    i want to add one more point
    truncate is faster then the delete and doesn't use as much undo space as delete


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact