What is the difference between TRUNCATE and DROP?
Ankur Jain
Truncate removes all records from table while Drop for delete the table from database.
TRUNCATE rapidly removes all rows from a table while maintaining the table definition. (Row by row DELETE can take time, especially for tables with lots of keys.) It comes in handy for such things as log tables that start out empty for each week's production. It has the convenient side effect of resetting the indexes and releasing unused disk storage. I have used TRUNCATE to wipe out the contents of a log table that used to contain millions of rows, to switch to an operational discipline where it only contains a weeks' worth of rows, for example.
Drop Removes a remove the structure of object and data while truncate remove the data only
Drop Removes a table from the database. Table structures, indexes, privileges, constraints will also be removed.. truncate Removes all rows from a table, but the table structures and its columns, constraints, indexes remains.
TRUNCATE removes all data from the table while retaining the table structure, whereas DROP removes the table from the database.
truncate removes data permanently from database,data cannot be rollback after truncate but drop removes data temporary and data can rollback.
??? runman7942.com ?? ???? ???? ?? ????
truncate delete all the values in the tables and keep the table empty but drop delete the table
TRUNCATE removes all data from the table while retaining the table structure DROP removes the table data and structure.
TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE. The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.
TRUNCATE removes all data but retains the table and its structure. DROP removes the table and its data from the database.
TRUNCATE only remove the data from table and DROP remove data as well as table definition from database
A WHERE clause can be used to only remove some rows. TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. The DROP command removes a table from the database.
Drop command completely Delete the table but truncate command only remove data from table..
http://dotnet-munesh.blogspot.in/2013/12/difference.html
Delete command is used to remove the particular row you want to delete from the table by using the where clause. Truncate command is used to delete all the rows from the table. Drop command is used to remove the table from the database.
TRUNCATE removes all data from the table while retaining the table structure and rollback is possible, whereas DROP removes the table from the database with table structure so rollback is not possible.
Truncate: Commit and rollback are not possible. Require very less space. No need to fire trigger. Faster execution. Its a DML command. Drop: Commit and rollback not possible. Requires NO space. Faster execution. More faster.