22
Reply

What is the difference between TRUNCATE and DROP?

Ankur Jain

Ankur Jain

Aug 18, 2014
3.4k
1

    Truncate removes all records from table while Drop for delete the table from database.

    sajidlkhan lodi
    February 10, 2015
    3

    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.

    Shivam Shukla
    February 04, 2015
    1

    Drop Removes a remove the structure of object and data while truncate remove the data only

    Mitesh Patel
    December 22, 2014
    1

    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.

    Tusharika T
    December 22, 2014
    1

    TRUNCATE removes all data from the table while retaining the table structure, whereas DROP removes the table from the database.

    Ankur Jain
    August 18, 2014
    1

    truncate removes data permanently from database,data cannot be rollback after truncate but drop removes data temporary and data can rollback.

    Bhuban Magar
    January 06, 2017
    0

    ??? runman7942.com ?? ???? ???? ?? ????

    Jiseo Lee
    October 18, 2016
    0

    truncate delete all the values in the tables and keep the table empty but drop delete the table

    Keerthi Venkatesan
    April 20, 2016
    0

    TRUNCATE removes all data from the table while retaining the table structure DROP removes the table data and structure.

    Ashish Srivastava
    January 09, 2016
    0

    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.

    Pankaj Kumar Choudhary
    August 28, 2015
    0

    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.

    Pankaj Kumar Choudhary
    August 28, 2015
    0

    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.

    Pankaj Kumar Choudhary
    August 28, 2015
    0

    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.

    Rakesh
    July 18, 2015
    0

    TRUNCATE removes all data but retains the table and its structure. DROP removes the table and its data from the database.

    Vijaya Sankar N
    June 16, 2015
    0

    TRUNCATE only remove the data from table and DROP remove data as well as table definition from database

    Rahul Prajapat
    May 27, 2015
    0

    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.

    Kml Surani
    May 13, 2015
    0

    Drop command completely Delete the table but truncate command only remove data from table..

    http://dotnet-munesh.blogspot.in/2013/12/difference.html

    Munesh Sharma
    February 14, 2015
    0

    Truncate removes all records from table while Drop for delete the table from database.

    sajidlkhan lodi
    February 10, 2015
    0

    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.

    Vikas Kumar Garg
    January 17, 2015
    0

    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.

    Akhil Garg
    September 14, 2014
    0

    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.

    Mahanti Chiranjeevi
    September 09, 2014
    0