Truncating Tables

In this lesson we are going to study about how to truncate table.

  Truncate statement remove all the rows from the table also perform these task.
  • It De-allocates all space used by the removed rows and it also sets the NEXT  storage pointer to the free space .
  • More efficient than dropping and re-creating a table .
  • Removing rows with the TRUNCATE statement can be faster than removing all rows with the DELETE statement.
Syntax:

TRUNCATE Table Table_Name;

  In this syntex TRUNCATE is the keyword table name specify the name of the table to truncate .

Example:  Truncate the table : test_employees

TRUNCATE Table test_employees;

Related article :
I am interested in hearing your feedback, so that I can improve my articles and learning resources for you.connect with us on facebooktwitter

Share

Did you enjoy reading this and found it useful? If so, please share it with your friends:

No comments:

Post a Comment