top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

what is Truncate is Oracle?

+2 votes
146 views
what is Truncate is Oracle?
posted Apr 24, 2015 by Kunal Kapoor

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Oracle TRUNCATE statement allows you to quickly delete all rows of a table or cluster.

Use the TRUNCATE statement to remove all rows from a table or cluster. By default, Oracle Database also performs the following tasks:

Deallocates all space used by the removed rows except that specified by the MINEXTENTS storage parameter

Sets the NEXT storage parameter to the size of the last extent removed from the segment by the truncation process

Removing rows with the TRUNCATE statement can be more efficient than dropping and re-creating a table. Dropping and re-creating a table invalidates dependent objects of the table, requires you to regrant object privileges on the table, and requires you to re-create the indexes, integrity constraints, and triggers on the table and respecify its storage parameters. Truncating has none of these effects.

Removing rows with the TRUNCATE statement can be faster than removing all rows with the DELETE statement, especially if the table has numerous triggers, indexes, and other dependencies.

answer Apr 24, 2015 by Shivaranjini
...