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.
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 facebook, twitter
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 facebook, twitter
No comments:
Post a Comment