Truncate (SQL)
From Wikipedia, the free encyclopedia
In SQL, the TRUNCATE
statement removes all the data from a table. The TRUNCATE
statement is not actually a part of the SQL standard, but many relational database management systems implement it. It is equivalent in function to a DELETE FROM my_table;
statement. However, on some systems, it is implemented differently.
[edit] See also
In SQL Truncate statement doesn't delete the content of a table which is to be truncated while it removes the address of the table from the list containing addresses to identify the table. That's why Truncate statement is 300 times faster than Delete statement of SQL because Delete statement removes the content of table one-by-one.
Truncate Table [schema][.] <table_name>;